Word VBA >> suppressing field updates

by KWach » Thu, 22 Jul 2004 23:12:53 GMT

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?


Word VBA >> suppressing field updates

by Jezebel » Fri, 23 Jul 2004 07:53:14 GMT


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.










Word VBA >> suppressing field updates

by Andra » Fri, 23 Jul 2004 15:58:23 GMT

"Jezebel" wrote
post

Word6, Word2000 Insert > Caption does it


"KWach" wrote

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




suppressing field updates

by Dave Lett » Fri, 23 Jul 2004 20:53:06 GMT

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







Similar Threads

1. Suppress field if another field is suppressed - VB Crystal Report

2. Suppressing author field in citation suppresses title as well

I've been working with Word 2007 to do MLA citations.  When I have two or 
more sources from the same author and choose to supress the author's name in 
a citation generated by the system, the title entry is also automatically 
supressed.  I have been converting those citations to static text and 
manually editing them, but this is not optimal.  Has anyone else experienced 
this problem?  Thanks.

3. Suppress word dialog - Fields.Update - Word VBA

4. Field updates on print even though Update Fields not checked

Hello we've got a doc with the date originally inserted and doc saved in the 
past (just date, not createdate field).  Even though 
Tools|Options|Print|Update Fields is not checked, it updates the field when 
we print.  Please advise, user indicates it never used to do this and we 
can't use createdate for other reasons.  Please advise--thanks much in 
advance.

5. Text field in text box does not update on Fields.Update( ) - Word VBA

6. Suppressing "Disable Macros" dialog box and suppressing other dialog boxes in word APPLICATION not document

Hello all I have two question.

1. how suppress the "Disable Macros" box when a document with macros
is opened automatically.
So far I have read a lot about is by going to the
tools-->options-->general and un-checking Macro Virus Protection as
well as application.Options.VirusProtection = False. My question is
how do I put this code to fire up before the document opens up. Please
bare in mind the document/template will be located in the network and
there are too many users to go to each machine and set
tools-->options-->file locations-->Workgroup templates to be of the
network folder name.

2. My second question deals with suppressing message boxes related to
the application and not the document. When I am in the document and I
copy a few pages of data and try to close the document, I have it set
so the message box prompting me to save is disabled but when I try to
close the Word application it says "You placed a large amount of text
on the clipboard. Do you want this text to be available to other
application after you quit Word?  YES  NO  Cancel". I would like to
choose yes without the user seeing this message box. How will I be
able to do this?



Thanks in advance for any help you provide, this is my first day
working with VBA

Faris

7. problem using 'Suppress if duplicated' with a field in a Crystal report - VB.Net

8. dynamically suppress fields based on parameter value

I need a way to dynamically suppress subtotal fields based on a
parameter. I can use the param to suppress an entire section, but can't
find how to do this to individual fields.

If that's not possible does anyone know the syntax required to
dynamically set the font color?

Thanks in advance.