1

I have an MS Access 2016 application that will have a number of users who will have their Trust Center Settings set at different levels.

The form that I have set to come up automatically at start-up just has text that prompts a user to enable all content before continuing and a single 'Continue' button.

In testing this I first had my Trust Center Settings to "Disable all macros with notification". When I brought up the app, I got the Yellow Bar allowing me to enable content.

I then set the Trust Center Settings to "Enable all Macros". I brought the app down and then back up and got no Yellow Bar.

I then set the Trust Center Settings to "Disable all Macros without notification". When I brought the app down and back up I got no Yellow Bar, and I was able to execute my macros. I was hoping that the macros wouldn't work so I could continue testing for all different user security settings.

What is happening? Has my app somehow gotten on a Trusted Documents list? If so, I don't know where to look for that as there is nothing listed on the Trusted Documents dialog in MS Access.

Koughdur
  • 43
  • 1
  • 7
  • You are looking for https://jcutrer.com/howto/excel/clear-trusted-documents-reset-enable-macros-prompt – Andre Mar 30 '22 at 20:32
  • Thank you. Please post as answer and I will give you credit. – Koughdur Mar 30 '22 at 20:40
  • You have done that better than I would have had patience for. :) -- FWIW, I disagree with the close votes - this is very much programming related, and that link was pretty hard to find. – Andre Apr 01 '22 at 12:00

1 Answers1

2

Thanks to Andre for referring me to the Jcutrer.com site. I am only answering this question myself because I have been chastised in the past for letting a question go unanswered for longer than a day, and Andre has not posted his comment as an answer.

In brief:

  1. Even if your Macro Trust Settings are set to "Disable all macros with notification", once you enable macros for a particular app, that app will be added to the list of Trusted Documents in your registry.

  2. Once an app has been added to the list of Trusted Documents, regardless of your Macro Trust Settings, the macros will automatically be enabled when you bring that app up at a later date.

  3. The Trust Settings list for MS Access is stored in the registry here:

HKEY_CURRENT_USER\Software\Microsoft\Office<Office Version>\Access\Security\Trusted Documents\TrustRecords

  1. There are similar locations for other MS Office apps like Excel

  2. All you need to do is go to that location in the registry, identify the app by it's file path and name, and delete that value from the registry. The next time you bring up the app it will do so in accordance with your Macro Trust Settings, e.g. if you have set it to "Disable all macros without notification" then your macros will be disabled.

Whine: Once again my question has been marked as having been insufficiently researched before posting. I tried many things in the code, and completely familiarized myself with the Trust Settings interface available to me through the File > Options interface. I searched for some time on Stack Overflow for an answer. I googled for quite some time as well. All to no avail.

In the end, the answer was in a place that was not obvious. If I had known enough to look into the registry or know that MS would willy-nilly mark an app as a Trusted Document just because I enabled the macros once, then I obviously wouldn't have posed the question.

It seems that in order for someone to be considered to have researched a question sufficiently, they basically had to come within a hair's width of the answer. What message does it send to insinuate that users are too stupid or too lazy to do a sufficient amount of work before posting on Stack Overflow?

Koughdur
  • 43
  • 1
  • 7