View Single Post
  #2   Report Post  
UCHelp UCHelp is offline
Junior Member
 
Posts: 5
Default

Quote:
Originally Posted by UCHelp View Post
Hey guys,

I wrote a macro that auto-updates all fields in a word document upon opening the document. I realized that this macro is local to my computer, so other people who open the file are not having their fields auto-update.

Is there a way to attach a macro to a word document so anyone who uses the document will have the macro work for them? I have tried searching for an answer for a while, but no dice.

Thank you very much,
UCHelp
I figured this out on my own. Thanks.

What I did was made sure I created the macro for that document only, and then when the Visual Basic program is launched, expanded the Microsoft Word Objects folder on the left hand side, and double-clicked "ThisDocument" then added the macro's VBA code to the window that pops up. Then I saved, then saved the document.