Press Alt+F9 to toggle off the display of the field codes.
Alternatively, instead of using the code to insert the data into the .Range
of bookmarks, use
With ActiveDocument
.Variables("varContractorShortName").Value = txtContractorShortName
.Range.Fields.Update
End With
in the user form and in the template insert { DOCVARIABLE
varContractorShortName } fields in each location where you want that data to
appear.

Signature
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
>I know that this question has been asked before and I have tried the
>answers
[quoted text clipped - 17 lines]
> questions.
> Can someone please tell me what I am doing wrong? I am using XP.
Michelle - 04 Jan 2006 02:07 GMT
Many thanks Doug, you have saved the day!
It didn't work with the DocVariable field but it did when I inserted a Ref
field instead, but I had to leave the lines you provided in visual basic.
The Ref field wouldn't work when I took those lines out.
I don't know why it works but it does, so thank you. You have saved my
computer from a short flight out of a small window!
Michelle

Signature
Michelle
> Press Alt+F9 to toggle off the display of the field codes.
>
[quoted text clipped - 31 lines]
> > questions.
> > Can someone please tell me what I am doing wrong? I am using XP.