A Microsoft Word forum. Microsoft Office Word Forum - WordBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Microsoft Office Word Forum - WordBanter forum » Microsoft Word Newsgroups » Mailmerge
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Attach Auto-Update Macro to Word Document?



 
 
Thread Tools Display Modes
  #1  
Old July 27th 10, 04:22 PM
UCHelp UCHelp is offline
Junior Member
 
First recorded activity by WordBanter: Apr 2010
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
Ads
  #2  
Old July 28th 10, 06:17 PM
UCHelp UCHelp is offline
Junior Member
 
First recorded activity by WordBanter: Apr 2010
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  
Old December 5th 12, 11:05 AM
eddie_kumar eddie_kumar is offline
Junior Member
 
First recorded activity by WordBanter: Dec 2012
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/ ).
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
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 10:17 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright 2004-2020 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.