Discussion Locked

Word Macros Question

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Is there a technique you can use so that a macro will only apply to a particular single Word document, but not globally to all documents? If so, how would this be implemented?

I already have the macro I need; I just need to figure out how itwill only run in the document I added it in and not all of my other Word documents.,

5 replies

by syscokid

Macros are saved in normal.dot by default. So create your macro in any document. Then open the document you want the macro to run in. Click on Tools, Macro, Macros, then the Organizer button. You can then copy your macro from normal.dot to your document, then delete the macro from normal.dot. I'm pretty sure that should fix you up.

by dklippert

When you're creating/recording a macro, an easy way to make sure it is containied in the document is to change the drop down box to the name of the open document.
The more formal way is to open the Visual Basic editor, select the document in the Project pane and insert a Module for that document.

This discussion is closed to new replies.