auto update field

S

Shaolin

Hi,

Is anyone out there know how to update a field (cell) automatically. I'd
created a simple formula for the field. How do I get this field to update
automatically without having literally select the field and choose update
field.

Thanks!!
 
G

Greg Maxey

Shaolin,

Unless you are using a protected form with "calculate on exit" set in your
field setup dialog then updating fields automatically is not possible in
Word.

When a change is made, you can update the field by selecting the field and
pressing F9, or update all fields by pressing CTRL+a (selects all) and
pressing F9, toggling to and from print preview (if "Update Fields" is
checked in the File>Print>Options dialog box), or running a macro something
like:

Sub UpdateFields()
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
 

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