View Single Post
  #7  
Old July 2nd, 2004, 10:07 AM
Peter Jamieson
external usenet poster
 
Posts: n/a
Default ASK Field Behavior

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