Reply
 
Thread Tools Display Modes
  #1   Report Post  
UCHelp UCHelp is offline
Junior Member
 
Posts: 5
Default Attach Auto-Update Macro to Word Document?

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
  #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.
  #3   Report Post  
eddie_kumar eddie_kumar is offline
Junior Member
 
Posts: 1
Default

Quote:
Originally Posted by UCHelp View Post
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.

Another easy way is to use the "Organizer" to assign/transfer across macros. see steps below:

Porting across 'Styles' or 'Macros' from one word doc/template to another:
• Open "Templates and Add-ins" dialogbox ( Developer tab - (under Template) Document Template )
• 'Organizer' button
• Under 'Style' tab, 'Copy' across the Styles and under 'Macros' tab, Copy across the Macros between 2 documents / templates (shown in 2 columns)
• Note: you can Open or Close word documents or templates by clicking the 'Open/Close' buttons below.
Ref: Title: Word: Use the Organizer to copy macros, styles from one document to another (goto: cybertext.wordpress.com/2010/09/20/word-use-the-organizer-to-copy-macros-styles-from-one-document-to-another/ ).
Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Lost document when auto update benbuilder Microsoft Word Help 1 June 12th 08 11:46 AM
Auto Update SaveDate before closing document Jade5 Microsoft Word Help 4 January 8th 08 07:43 PM
Can you setup auto field update? In a word 2003 document Field update? New Users 2 August 17th 05 10:54 PM
create a macro to update (save) document Lae Microsoft Word Help 1 June 8th 05 12:59 AM
Attempting to auto-update fields in a word document Sanin R Microsoft Word Help 1 January 7th 05 07:39 PM


All times are GMT +1. The time now is 02:44 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"