Home > Blockchain >  I want a Word macro to be only associated with a specific .docm file
I want a Word macro to be only associated with a specific .docm file

Time:10-29

I have written a macro in Word, assigned it to a button in the Quick Access Toolbar, and saved the file with '.docm' extension. My code is stored in a new module under project(MyProject) -> Modules -> Module 1, not under Normal. Initially everything worked as I wanted: I opened the .docm document, clicked Enable Content on the yellow Message Bar, and used the button in the Quick Access Toolbar to run the macro. No other Word document, when opened, showed either the Message Bar or the dedicated button for the macro. However, after some time both the bar and the button started to appear on any Word documents that I open. I just want the message bar and the macro button to be displayed when I open the .docm file and not in any other Word files. Neither deleting and rewriting the macro nor deleting and recreating the .docm file solved the problem. Restarting the computer didn't help either, and there are no copies of this .docm file in any other directories. Any suggestions? Thank you.

CodePudding user response:

QAT icons can be added per-document or per-installation. To remove the per-installation icon you are now seeing, choose File>Options>Quick Access Toolbar. Under the Customize Quick Access Toolbar heading, ensure the dropdown is set to For all documents (default). Then select the icon you don't want to see and click on the Remove button.

  • Related