Field Update

P

Peter Huber

Hello

I wand to update all my fields in a document with the following code:

Dim f as Field
For each f in ActivDocument.Fields
f.Update
next

It's working fine with one exception: the field NumPages.

I have deleted one page, but the field doesn't update properly. With F9 it
works but the generated code
"Selection.Fields.Update" doesn't work too.

The field is placed in a normal first section and there is no protection.

Have you any suggestions?

Thanks Peter
 
D

Doug Robbins - Word MVP

Easiest way is to use

With ActiveDocument
.PrintPreview
Close PrintPreview
End With

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

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