I have a template that I have used bookmarks in which work fine, but because
there is a possibility of the data needing to be changed (via userform) after
the original document is created, I am trying to use a document variable
instead.
The following works fine --
ActiveDocument.Bookmarks("MyTest").Range.Text = oForm.txtMyTest.Text
However when I attempt the following, (I set a docvariable named MyTest in
the location where the bookmark previously existed) it fails to populate--
ActiveDocument.Variables("MyTest").Value = oForm.txtMyTest.Text
What am I doing wrong?
Thanks in advance!
SRD
Jonathan West - 06 Feb 2005 23:50 GMT
>I have a template that I have used bookmarks in which work fine, but
>because
[quoted text clipped - 10 lines]
>
> What am I doing wrong?
You're not updating the docvariable field after you change the value of the
variable. Add this line after
ActiveDocument.Fields.Update

Signature
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Jezebel - 06 Feb 2005 23:55 GMT
You need to update fields. If all the fields are in the body of the document
you can simply use
ActiveDocument.Fields.Update
If the fields are in headers, footers or any other StoryRange you need to
update them separately.
>I have a template that I have used bookmarks in which work fine, but
>because
[quoted text clipped - 13 lines]
>
> SRD
Doug Robbins - 07 Feb 2005 00:22 GMT
Which can usually be done most easily by using
ActiveDocument.PrintPreview
ClosePrintPreview

Signature
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.
Hope this helps,
Doug Robbins - Word MVP
> You need to update fields. If all the fields are in the body of the
> document you can simply use
[quoted text clipped - 23 lines]
>>
>> SRD
Starbird - 07 Feb 2005 00:37 GMT
Thank You!
> You need to update fields. If all the fields are in the body of the document
> you can simply use
[quoted text clipped - 21 lines]
> >
> > SRD