View Single Post
 
Old 02-22-2018, 08:14 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

It's a waste of time trying to replace the displayed content of a field as it will revert to its previous value immediately anything causes the field to refresh; you need to change the contents of the variable itself. That can be done with code like:
ActiveDocument.Variables("MyVar").Value = "some name"
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote