|
-
Jan 6th, 2004, 09:25 AM
#1
Thread Starter
Junior Member
Ms-word 2000 Vba Question
Does anybody know how to disable word from issuing warnings such as levels of undo due to memory etc.
Ideally its like in Access where u can say
docmd.setwarnings = false
I need to know the equivalent command for word VBA.
I have a VB program that generates catalogues from an access database. It takes 3 days on a powerfull PC to create 13 documents. It means clicking yes to a word prompt every 3 hours.
-
Jan 6th, 2004, 11:35 AM
#2
Word.Application.DisplayAlerts = wdAlertsNone
Will do the trick.
-
Jan 6th, 2004, 11:41 AM
#3
Re: Ms-word 2000 Vba Question
Originally posted by scobiej
It takes 3 days on a powerfull PC to create 13 documents. It means clicking yes to a word prompt every 3 hours.
from your main question I would guess that you dont know about "ScreenUpdating" either... you can turn off the display updates for Office applications, which speeds them up significantly when used from an outside application (although it does mean that you cant see what is happening).
you use it like this:
VB Code:
Word.Application.Visible = False
Word.Application.ScreenUpdating = False
Word.Application.DisplayAlerts = wdAlertsNone
< your code here >
Word.Application.DisplayAlerts = wdAlertsAll '(I'm not sure about "wdAlertsAll", it might be "True")
Word.Application.ScreenUpdating = False
Word.Application.Visible = False
the second half of this code should also be run in any error-handler that you have
-
Jan 8th, 2004, 11:00 AM
#4
Thread Starter
Junior Member
thanks SI, however, when i use that code word appears (GHOSTLIKE, as if display driver is messin the screen up).
However, the YES / NO confirm about levels of undo and continuing still appear.
It does appear to run faster though - which is great.
any ideas as to how this can happen when the values have been set?
many thanks
-
Jan 8th, 2004, 11:52 AM
#5
ok, try replacing "wdAlertsNone" with "False", and "wdAlertsAll" with "True". Ideally you should disable undo's too (or set a low limit to the number allowed), but I dont know how to do that.
no idea about the display issue i'm afraid!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|