Guys sorry I know this is day one stuff but you know what they say an answer to a question is only easy if you know the answer!!!
Does anybody know how to upate the value of a field within Word 97 from a Word 97 VB macro.
Thanks
Gibbo
Printable View
Guys sorry I know this is day one stuff but you know what they say an answer to a question is only easy if you know the answer!!!
Does anybody know how to upate the value of a field within Word 97 from a Word 97 VB macro.
Thanks
Gibbo
This will move to a USERNAME field and auto-update it:
Cheers,Code:Selection.GoTo What:=wdGoToField, Which:=wdGoToNext, Count:=1, Name:="USERNAME"
Selection.Fields.Update
Paul.
P.S. Record a few macros in Word to see how VBA works in Word.
Hi Gibbo !!!
Another Way
-cu TheOnlyCode:'asuming you have to update field 1 of the field collection
activedocument.fields(1).update
'and (I don't think you can use this on all fields)
activedocument.fields("Test").update