Fillin Fields

T

Treesy

I like to use fillin fields with a lot of my templates so people can input the information and customize the letter. What I haven't been able to figure out is how to set it up so it only asks you what your name is ONCE but will insert that information into several different locations in the document. In researching this problem, it looks like the "ASK" field might be the solution? But I've tried tinkering with that field and can't get it to work, I keep getting "Error! Bookmark not defined" My last attempt had one bookmark working but the others not working. (I was trying 3 different "questions".) I don't know how the one bookmark even worked because nothing ever prompted me to fill out the information. Any suggestions?

Thanks!
 
G

Greg Maxey

Treesy,

The ASK field assigns the bookmark and defines the prompt. It does not put
any information in the document. You have to use both ASK fields and REF
fields. For example {ASK Name "What is our name?"}{REF Name} blah blah blah
{REF Name} blah blah {REF Name}.

The problem with ASK fields is unlike FILLIN fields WORD does not trigger a
prompt to update when opening the document or creating a new document. You
can get around this by assiging the following code to a AUTONEW and AUTOOPEN
macro:

Dim oStory As Range
For Each oStory In ActiveDocument.StoryRanges
oStory.Fields.Update
If oStory.StoryType <> wdMainTextStory Then
While Not (oStory.NextStoryRange Is Nothing)
Set oStory = oStory.NextStoryRange
oStory.Fields.Update
Wend
End If
Next oStory
Set oStory = Nothing
 
G

Graham Mayor

M

macropod

Hi Treesy,

Another one - using ASK fields and no vba. The difference between ASK and
FILLIN fields, is that ASK fields set a bookmark without displaying
anything, and FILLIN fields display their results but don't set a bookmark.
You need a field that does both, such as:
{QUOTE{ASK BkMrk "Type your prompt here"}{BkMrk}}
As with any other field, the braces are entered in pairs via Ctrl-F9. This
makes the ASK field display its bookmarked results (BkMrk in this example),
just like a FILLIN field does at the point where you insert the field. To
get the 'answer' to repeat at other locations in your document, simply use a
REF field:
{BkMrk}
For each question, you'll need the ASK field to use a different bookmark
name (eg: BkMrk1, BkMrk2, BkMrk3 etc).

Cheers


Treesy said:
I like to use fillin fields with a lot of my templates so people can input
the information and customize the letter. What I haven't been able to
figure out is how to set it up so it only asks you what your name is ONCE
but will insert that information into several different locations in the
document. In researching this problem, it looks like the "ASK" field might
be the solution? But I've tried tinkering with that field and can't get it
to work, I keep getting "Error! Bookmark not defined" My last attempt had
one bookmark working but the others not working. (I was trying 3 different
"questions".) I don't know how the one bookmark even worked because nothing
ever prompted me to fill out the information. Any suggestions?
 

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