Last saved by does not display

G

Guest

Using Office 2003/WinXP. In the header, I'm using the option under Insert
AutoText, "last saved by", I can see the text "Last saved by" but not the
user's name. There is a name in Tools|Options|User Information. When I turn
on the field codes, I can see that the field code exists, but can not see the
actual name.
 
S

Suzanne S. Barnhill

Have you tried pressing F9 to update the field?

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
G

Guest

Thanks Suzanne. F9 works but requires the header to be reopened first.

I found this code:
Sub UpdateAll()
Dim oStory As Range
For Each oStory In ActiveDocument.StoryRanges
oStory.Fields.Update
If oStory.StoryType <> wdMainTextStory Then
While Not (oStory.NextStoryRange Is Nothing)
Set oStory = oStory.NextStoryRange
oStory.Fields.Update
Wend
End If
Next oStory
Set oStory = Nothing
End Sub

I also added a button to the toolbar to run this. This works fine, but first
the document needs to be saved, then click on the button, then save the file
again. That would be fine if it was just me using the file, but there are
going to be several people using this and would like this to be more
automatic. Is there some code that could be added that includes the saving
along with the field updating?
 
J

Jay Freedman

Between the "Dim" line and the "For Each" line, add this:

ActiveDocument.Save

Add another copy of the same line between the "Next oStory" line and the
"Set oStory" line.
 
G

Guest

Works great!!! Thanks Jay!
--
maryj


Jay Freedman said:
Between the "Dim" line and the "For Each" line, add this:

ActiveDocument.Save

Add another copy of the same line between the "Next oStory" line and the
"Set oStory" line.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top