View Single Post
  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Helmut Weber Helmut Weber is offline
external usenet poster
 
Posts: 139
Default Userinitials not updating automatically

Hi Deejay,

e.g.

Sub Test459()
' update all fields of type wdFieldUserInitials
Dim oFld As Field
For Each oFld In ActiveDocument.Fields
If oFld.Type = wdFieldUserInitials Then
oFld.Update
End If
Next
End Sub

Sub Test459b()
' update second field of type wdFieldUserInitials
Dim oFld As Field ' a field
Dim cFld As Collection ' a collection
Set cFld = New Collection
For Each oFld In ActiveDocument.Fields
If oFld.Type = wdFieldUserInitials Then
' add only fields of type wdFieldUserInitials
' to the collection
cFld.Add oFld
End If
Next
cFld(2).Update
End Sub

Still better would be to enclose the fields in question
in bookmarks at the time they are created.

Maybe I'm missing something.

--
Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"