Reply
 
Thread Tools Display Modes
  #1   Report Post  
Lgoo
 
Posts: n/a
Default Automatically Update Field Codes

Hi,

I work for a company that has many form business letters that we use
every day.
While the date field usually automatically updates, I would like there
to be a way to automatically update the username of the person and
posibly the title of the person using the document.

Example end of document:

----

Sincerely,

UserName
Title

While I see that there is a field code for username, is there a way to
write a macro or something that auto updates this field on open without
having to select it and press F9? I've tried the AutoOpen macro with:

ActiveDocument.PrintPreview
ActiveDocument.ClosePrintPreview

but this does not seem to work.

Any thoughts would be greatly appreciated.

Thanks,
Larry

  #2   Report Post  
Anne Troy
 
Posts: n/a
Default

If it's a template, use Document_New and Document_Open and if it's a
document, use Document_Open.
Try this code:
http://www.vbaexpress.com/kb/getarticle.php?kb_id=108
*******************
~Anne Troy

www.OfficeArticles.com
www.MyExpertsOnline.com


"Lgoo" wrote in message
oups.com...
Hi,

I work for a company that has many form business letters that we use
every day.
While the date field usually automatically updates, I would like there
to be a way to automatically update the username of the person and
posibly the title of the person using the document.

Example end of document:

----

Sincerely,

UserName
Title

While I see that there is a field code for username, is there a way to
write a macro or something that auto updates this field on open without
having to select it and press F9? I've tried the AutoOpen macro with:

ActiveDocument.PrintPreview
ActiveDocument.ClosePrintPreview

but this does not seem to work.

Any thoughts would be greatly appreciated.

Thanks,
Larry



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
How to automatically update TC field "marked text" wmcdan9569 Microsoft Word Help 3 April 25th 05 08:22 AM
Update field codes automatically, such as filename/path. jstogryn Mailmerge 1 March 25th 05 10:22 PM
Filename field in header - automatically update? Paul Kraemer Microsoft Word Help 1 February 9th 05 09:01 PM
HOW TO HIDE Field Codes automatically? sorazal Mailmerge 2 February 1st 05 10:33 PM
Text Form Field Ref in Footer Won't Update on Screen StarWine Microsoft Word Help 3 December 6th 04 06:17 PM


All times are GMT +1. The time now is 05:50 PM.

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

About Us

"It's about Microsoft Word"