I can't get ASK field to work!

R

Roger Ottaway

I am using word 2002.sp2. We have a number of word.dot templates which use
fill-in fields to complete the letters. The templates are only used once, so
we don't do an actual mail merge with a database of records or names and
addresses. Will the ASK field work with this type of letter, or does it rely
on an actual mail merge to work. I have inserted the ASK field in my
templates, with a REF field in a second set of Ctrl+F9 control brackets to
print out the text, but it just won't work! What am I doing wrong ?



Thanks .. Roger
 
G

Greg Maxey

Roger,

ASK Fields are not dependent on a Mail Merge. I don't
know exactly what you are doing to say what you are doing
wrong.

Here is a simple test. Type { ASK Test "Do you see
prompt?" } in a new blank document. Go down a few lines
and type { REF Test }.

Right click the ASK field and select update field.

Do you see a prompt? You should. Type yes and click OK.
The REF field should update and display yes.
 
R

Roger Ottaway

Greg

thanks for your help so far. With my word.dot templates with the fill-in
fields, we open a new copy (ie not the .dot file but a .doc copy) and the
document automatically prompts to fill in the fields. I have the bookmarks
and fields turned off, so at the end of filling in all of the fill-in
fields, the document updates automatically and bingo .. it is all done ready
to print.

I have done what you suggest and firstly, there is no prompt to "fill in"
the ASK field on opening a .doc copy of the template. But if I highlight the
ASK field I can get the menu option to update. That I can do, and click on
ok, but it doesn't update automatically. If I save the document, and then
reopen it, the REF test field has been updated. Should the ASK field, in
conjunction with the REF field, work the same as a fill-in field ?

thanks

Roger
 
G

Greg Maxey

Roger,

I think I see your issue now. It appears that Fillin
fields in a template are prompted for udpate when a new
document is created based on that template but ASK fields
are not.

Some one else may be along with a better answer, but all I
can think to do is to put the following AotoNew macro in
your template. It will cause ASK field prompts to appear
when a new document is created.


Sub AutoNew()
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
End Subs
 
G

Graham Mayor

You need an autonew macro in the *document template* to force an update on
the ask field.

Sub AutoNew()
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
End Sub

See http://www.gmayor.com/installing_macro.htm

--
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
Graham Mayor - Word MVP
E-mail (e-mail address removed)
Web site www.gmayor.com
Word MVP web site www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
 

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