View Single Post
  #9  
Old July 2nd, 2004, 12:11 PM
macropod
external usenet poster
 
Posts: n/a
Default ASK Field Behavior

Hi Graham et al,

You can solve the problem of the REF field in the header not displaying by
wrapping both fields with a QUOTE field, as in:
{QUOTE{ASK Age "How old are you?"}{Age}}

To suppress the 'Error! Bookmark not defined.' message before the ASK has
been answered, simply put an empty 'Age' bookmark immediately before the
field.

Cheers

"Graham Mayor" wrote in message
...
Having re-read Greg's first message, I have to say I don't get the problem
with the second REF field, only the reluctance of the first one to update.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




Peter Jamieson wrote:
Graham Mayor wrote:

FWIW I experience the same 'problem' here with Word 2003.
Update of fields in headers has always been a bit hit and miss. The
only way I was able to get this to display correctly was to modify
my update macro to use two techniques - the first to update the
fields and the second to switch print preview which forces the first
field to display correctly without forcing the prompt on the ask
field for a second time.

Sub UpdateAll()
Dim oStory As Range
Dim oField As Field
For Each oStory In ActiveDocument.StoryRanges
For Each oField In oStory.Fields
oField.Update
Next oField
Next oStory
Options.UpdateFieldsAtPrint = True
Application.ScreenUpdating = False
PrintPreview = True
PrintPreview = False
ActiveDocument.ActiveWindow.View.Type = wdPrintView
Application.ScreenUpdating = True
End Sub


Curious, isn't it? I have no problem either on Word 2000 or Word 2003,
either using manual updates or the for next loop with no additional
code. But I am using a very simple example.

Peter Jamieson





---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.711 / Virus Database: 467 - Release Date: 25/06/2004