Share via

Blocked macros in Office 2019 (Office for Windows)

Anonymous
2022-09-17T17:58:29+00:00

I'm running Office 2019 (Windows), and have had increasing issues with using my Word macros the last few weeks. I've authored and used macros for over 20 years, many times having to redo and tweak settings due to some lesser-known change Microsoft has made. Typically I've been able to find a workaround; however, this time, I'm stumped.

I have a custom startup.dotm file and a custom normal.dotm file, both of which contain custom macros. Both of these dotm files are digitally signed, using the SelfCert method, and they're both on the same PC where they were digitally signed. They're in separate folders, but both of those folders are listed in the Trusted Locations window of the Trust Center, and "Allow Trusted Locations" is enabled. (These folders are also specified in the File>Options>Advanced>File Location settings, for User Templates and Startup, respectively.) I am not using a network, either internal or external. The Macro Settings in the Trust Center are set to "Disable all macros except digitally signed macros" and "Trust access to the VBA project object model." I even removed all properties of the dotm files, in case there were any old properties that were conflicting.

Even so, when I open an existing Word document OR create a new doc, the Security Risk message bar appears, saying "Microsoft has blocked macros from running because the source of the file is untrusted." Sometimes the Blocked Content message bar also appears, saying "Trusted document settings have changed, not all content in this file is allowed to run." Note that the document itself (docx) does not contain any macros; the macros are solely housed in the underlying dotm files.

I can understand macros being curtailed if a potentially malicious document is arriving via email or from the internet, but when I wrote these macros on the same PC where I'm trying to use them, and I've been using most of them for a long time, it seems a bit counterproductive to block them.

Can anyone shed any light on what I'm overlooking? Thanks in advance!

Microsoft 365 and Office | Word | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

6 answers

Sort by: Most helpful
  1. Charles Kenyon 166.7K Reputation points Volunteer Moderator
    2022-09-17T19:08:03+00:00

    ***

    Can anyone shed any light on what I'm overlooking? Thanks in advance!

    Light: Microsoft has decided to be less trusting, probably in response to feedback from corporate IT departments.

    Workaround / Best Practices:

    Frankly, I was going to suggest much of what you are doing.

    Try Disable All Macros with Notification.

    I have not run into these problems with Office 365 or Office 2021. On my machines, that misleadingly named setting allows my macros in trusted locations to run.

    Unless you have a specific reason to do so, the Trust Access to the vba project model should not be checked. This does not have anything to do with the ability to run your macros but has to do with macros, themselves, writing additional code (I think). I have one Add-In I use that requires this and I check it to use that. (Chris Woodman's Keyboard Shortcut Organizer)

    Regardless of whethher or not that lets your macros run, I suggest leaving feedback. MS will know nothing of your problem from your post here.

    How do I give feedback on Microsoft Office?

    2 people found this answer helpful.
    0 comments No comments
  2. Charles Kenyon 166.7K Reputation points Volunteer Moderator
    2022-09-22T17:58:58+00:00

    Like Doug, the macros I routinely use to get work done are in separate global or document templates, not in my normal .dotm. Unlike Doug, apparently, I store a tremendous number of macros in normal that I use when giving advice here or when trying to solve a problem. I consider these resources.

    Image

    Virtually none of these are used on a regular basis. I find keeping them in the normal template convenient, though. My User Templates folder, which holds the normal.dotm file is not the default since I have separate ones for each version of Word.

    Generally, I save recorded macros in the active document rather than in the normal template. If I think they will be useful, I copy them into one of the modules in the normal template or to one of my globals.

    The location for my user templates is marked as a trusted location. This is a local folder synced to DropBox. I think you tried setting your User Templates folder as a trusted location and it was not working for you, though.

    These resource macros are fairly well documented and are marked as Private so they won't show up in my Macros list when using Word. I try to source them as well since most are ones I found on the web. Here is a screenshot from one of my modules. Because of the documentation and having them all in one project, it is easy to search for ones that I want to examine, both by topic and by commands used. (This would work with a separate scratch .dotm macro holder as well, but would have the extra step of opening the template. Long term, that may be a better choice than storage in the Normal template.)

    Image

    Both the size of my Normal.dotm and the number of global templates loaded does slow down the startup of Word. Since all are on an SSD drive, I do not find this delay that problematic, though.

    For best practices on Macro storage, also see MVP Beth Melton's page. https://wordmvp.com/FAQs/MacrosVBA/OrganizeMacros.htm

    1 person found this answer helpful.
    0 comments No comments
  3. Anonymous
    2022-09-22T17:17:00+00:00

    Update: After moving all the macros from the normal.dotm file to one of the startup.dotm files, the "blocked" messages no longer appear. So even though there'll be a few extra steps when experimenting, the macros aren't blocked.

    Thanks to all who provided ideas and suggestions!

    1 person found this answer helpful.
    0 comments No comments
  4. Doug Robbins - MVP - Office Apps and Services 322.9K Reputation points MVP Volunteer Moderator
    2022-09-17T21:23:11+00:00

    For what it's worth, these are my recommendations:

    1. The Normal.dotm should only be used as a "scratch pad" for macros that are only needed on a once-off basis
    2. Any macros that you want to be available for use with any document should be located in a macro enabled template that is saved in the Word Startup folder
    3. Macros required for use with specific documents should be located in the template from which those documents are created

    While the Normal.dotm template does, in some way, act like an Add-in, an important difference is that the modules in the Normal.dotm template are always available for editing, without the user needing to specifically open that template, which is what has to be done if any editing is required to macros that are located in a macro enabled template that is stored in the Word Startup folder

    That makes the Normal.dotm template somewhat more vulnerable to nefarious actions and I believe that it is for that reason that Microsoft have tightened the screws on it.

    1 person found this answer helpful.
    0 comments No comments
  5. Anonymous
    2022-09-17T19:53:58+00:00

    Thank you! Indeed, the original setting I had in the Trust Center was to "disable all macros without notification" and the "Trust Access to VBA" wasn't selected. So the current settings were experimentations -- which obviously didn't help. :)

    Per your suggestion, I've also submitted feedback directly to Microsoft.

    It's just puzzling why most of these macros have run for many years -- without any issues -- and now, all of sudden, they won't run. It's frustrating!

    0 comments No comments