Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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 | |
|
|
![]() |
||||
Thread | Forum | |||
How to automatically update TC field "marked text" | Microsoft Word Help | |||
Update field codes automatically, such as filename/path. | Mailmerge | |||
Filename field in header - automatically update? | Microsoft Word Help | |||
HOW TO HIDE Field Codes automatically? | Mailmerge | |||
Text Form Field Ref in Footer Won't Update on Screen | Microsoft Word Help |