atw: SEC: UNCLASS RE: Word macro to update Document Properties
- From: "Silcock, Howard DR" <Howard.Silcock@xxxxxxxxxxxxxx>
- To: <austechwriter@xxxxxxxxxxxxx>
- Date: Mon, 31 Oct 2005 13:12:05 +1100
Daragh
I can't understand why you couldn't record this macro.
If you still can't get it to work, it should be easy enough to write
this macro yourself. Try following these steps (with apologies if I
oversimplify for you). Open a new blank document. Select Tools > Macro >
Macros... to display the Macros dialog box. Make sure that the drop-down
labelled 'Macros In' displays 'All active templates and documents', then
type a macro name such as SetCompanyName in the 'Macro name' text box
(no spaces in the name). Click Create. The VBA Editor opens with the
insertion point already positioned for entering the macro code. Type
ActiveDocument.BuiltInDocumentProperties("Company") = "Willy Wonka's
Chocolate Factory"
- but you'd better put your company name in place of Willy Wonka's
Chocolate Factory (leave the quotes there, though).
That's all you need for your macro. Select File > Close and Return to
Microsoft Word.
Now SetCompanyName should appear in your macro list. When you run it
with one of your 100+ documents open and activated, it should reset the
company name in that document to what you specified. (You could even
automate the process further and get a macro to open each document in
turn and make the change then save it and close it, but let's stick with
this for now.)
Let us know how you go.
Howard
====================================
Howard L. Silcock
Technical Writer
Common Services SOE Program
Network Infrastructure Development
Department of Defence
(02) 626 58828
====================================
**************************************************
To post a message to austechwriter, send the message to
austechwriter@xxxxxxxxxxxxxx
To subscribe to austechwriter, send a message to
austechwriter-request@xxxxxxxxxxxxx with "subscribe" in the Subject field.
To unsubscribe, send a message to austechwriter-request@xxxxxxxxxxxxx with
"unsubscribe" in the Subject field.
To search the austechwriter archives, go to
www.freelists.org/archives/austechwriter
To contact the list administrator, send a message to
austechwriter-admins@xxxxxxxxxxxxx
**************************************************
Other related posts:
- » atw: SEC: UNCLASS RE: Word macro to update Document Properties