Help on how to populate fields on a Word document?

I

ImOkYoureNot

I have the following in my document (Word 2002 on Windows XP)


I would like to have a document and place some fields on it. A macro
will then execute and populate the fields with information. There will
be no database access so I will not use mailmerge.

I tried adding {DOCVARIABLE CoName } but it doesnt seem to show the
values when I toggle.

E.g.

ActiveDocument.Variables("CoName").value = "My Company Name"

What am I doing wrong?

Thanks
 
D

Doug Robbins

In addition to toggling off the display of the field codes, it will be
necessary to update the fields to show the information that is stored in the
variable.

--
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
 
I

ImOkYoureNot

Doug Robbins said:
In addition to toggling off the display of the field codes, it will be
necessary to update the fields to show the information that is stored in the
variable.

What do you mean by "Update the fields". I run the macro. Then switch
to the document and see nothing. Do I have to do something else? (I do
toggle the field codes)

Thanks
 
D

Doug Robbins

Ctrl+a then F9

--
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top