Populate multiple areas of a template using fillin fields

G

Guest

How do I insert a field such as 'fillin' or 'ask' so that when a Word
Template is opened the requested information populates many areas of the
document.

Example: I want the user to be asked to record the title of a product and I
want this to populate the title page, the footer, the header and three other
places in the document too.

I can set up six seperate 'fillin' fields but it measn the user having to
type in the same details six times into six dialogue boxes. The help section
says you can do it using 'ask' and 'ref' fields but these need a bookmark
which won't be created until the user has opened the template!
 
D

Doug Robbins

For just one piece of data, the simplest thing to do is insert { Docvariable
"varname" } fields at the locations where you want the data to appear and
have an autonew macro that causes an InputBox to appear so that the user can
enter the information into and then updates the fields in the document so
that the data is displayed. The following is the basics of the code for the
autonew macro

With ActiveDocument
.Variables(varname).Value = InputBox("Enter whatever it is here", "Title
for Input Box")
.PrintPreview
.ClosePrintPreview
End With

For multiple pieces of data, it would be better to use a Userform.

See the article "How to create a Userform" at:

http://word.mvps.org/FAQs/Userforms/CreateAUserForm.htm


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

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