suppressing field updates

K

KWach

I have a function that inserts many pictures into a
document and inserts figure captions for each one. After
each insertion it seems that Word takes time to update
field values. Is there a way I can suppress the field
updates until all the insertions are complete? If so, is
it likely to allow the function to run faster?
 
J

Jezebel

I think you might be looking in the wrong place for the problem. Word
doesn't automatically update fields in an open document. Perhaps if you post
your code ...?

Some tricks you could try anyway: do the inserting in Normal rather than
Print Preview mode; display picture placeholders; use Range objects and not
the Selection object; work with the document hidden.
 
A

Andra

I think you might be looking in the wrong place for the problem. Word
doesn't automatically update fields in an open document. Perhaps if you post
your code ...?

Word6, Word2000 Insert > Caption does it


I have a function that inserts many pictures into a
document and inserts figure captions for each one. After
each insertion it seems that Word takes time to update
field values. Is there a way I can suppress the field
updates until all the insertions are complete? If so, is
it likely to allow the function to run faster?

Instead of InsertCaption method, the macro code may be programmed
differently: for example, 1) write text “Figure ”, insert field, write text
“seq Figure \* arabic”, apply Caption style; 2) use caption copy,paste.
 
D

Dave Lett

Hi KWach,

What you're probably encountering is background pagination. Run the
following to find out your pagination setting:

MsgBox "Background pagination is " & Options.Pagination

If it's true, then you might want to try developing your routine with
something like the following:

Options.Pagination = False
'''run your routine
Options.Pagination = True

You might also be able to speed up your routine by switching to draft mode,
as in the following:

ActiveDocument.ActiveWindow.View.Draft = True
Options.Pagination = False
'''run your routine
Options.Pagination = True
ActiveDocument.ActiveWindow.View.Draft = False

HTH,
Dave
 

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