|
-
Feb 26th, 2010, 06:54 AM
#1
Thread Starter
Lively Member
Word 2003 auto field update
Hi all,
Bit of a golden oldie for ya! We use Word 2003 and use a field in footer to show the file path of the document, I found out later that the auto field update isn't included in 2003, so I used the MS advice and added the code that does it.
Works a treat.... but our users have found that every time they save a document it updates the field with the new location, and records it as an alteration, which requires another save when they close the doc down, not a major issue, but a slight annoyance, is there a way to re jig the code so as it becomes a part of the save process so as it doesn't require another save?
Code:
Sub UpdateDocFields()
' Called by ModSave:FileSave and FileSaveAs and modOpen:FileOpen
' Updates fields in the active document
' Macro created 08/02/2010 by Robert Morley
Dim aStory As Range
Dim aField As Field
For Each aStory In ActiveDocument.StoryRanges
For Each aField In aStory.Fields
aField.Update
Next aField
Next aStory
End Sub
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|