I'm working on a small VB-Word automation program which generates and prints
a Word Document. The only problem that I face is that Word fires a warning
dialogue stating that the borders of the document are beyond the printable
regions. Each time I need to click 'OK' within this window and the printing
is done without any problem. Since the warning dialogue pops up with each
document this kills my automation. How can I (temporary) get rid of this
annoying pop up without changing the Word document by Word VBA coding?
Jean-Guy Marcil - 11 Aug 2006 16:33 GMT
Oscar was telling us:
Oscar nous racontait que :
> I'm working on a small VB-Word automation program which generates and
> prints a Word Document. The only problem that I face is that Word
[quoted text clipped - 4 lines]
> How can I (temporary) get rid of this annoying pop up without
> changing the Word document by Word VBA coding?
Have you tried with this line of code at the beginning of your Sub:
Application.DisplayAlerts = wdAlertsNone
and with this at the end:
Application.DisplayAlerts = wdAlertsAll

Signature
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org
Oscar - 11 Aug 2006 17:00 GMT
Hi Jean-Guy,
I've tried that and it didn't help. The warning dialog still appears and
asks me whether I want to continue. Maybe it's not a Word standard warning
dialogue
regards,
Oscar
> Oscar was telling us:
> Oscar nous racontait que :
[quoted text clipped - 15 lines]
>
> Application.DisplayAlerts = wdAlertsAll
Cindy M. - 11 Aug 2006 18:03 GMT
Hi Oscar,
> I'm working on a small VB-Word automation program which generates and prints
> a Word Document. The only problem that I face is that Word fires a warning
[quoted text clipped - 3 lines]
> document this kills my automation. How can I (temporary) get rid of this
> annoying pop up without changing the Word document by Word VBA coding?
I don't think you can, short of fixing the actual problem causing the prompt.
Is this always the same document?
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org
This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)
Oscar - 11 Aug 2006 18:39 GMT
Hi Cindy,
I've had the problem with several documents.
regards,
Oscar
> Hi Oscar,
>
[quoted text clipped - 22 lines]
> reply
> in the newsgroup and not by e-mail :-)
Cindy M. - 12 Aug 2006 10:52 GMT
Hi Oscar,
> I've had the problem with several documents.
>
Do they all come from the same source? Usually if you see this message there's
something wrong in the document (a picture out in the margins, for example).
The document(s) (and the source from which they're coming) need to be fixed.
Or you need to find a printer with a driver that can handle this special
situation.
> >> I'm working on a small VB-Word automation program which generates and
> >> prints
[quoted text clipped - 11 lines]
> > prompt.
> > Is this always the same document?
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org
This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)
Jean-Yves - 30 Aug 2006 14:58 GMT
Hi all,
Had that problem some month ago.
Setting the alerts to none does not work if backgroung printing option is
selected.
Try this :
Dim temp as boolean
temp = Application.Options.PrintBackground
Application.Options.PrintBackground = False
Application.DisplayAlerts = wdAlertsNone
ActiveDocument.PrintOut
Application.DisplayAlerts = wdAlertsAll
Application.Options.PrintBackground = temp
Regards
Jean-Yves
> I'm working on a small VB-Word automation program which generates and
> prints a Word Document. The only problem that I face is that Word fires a
[quoted text clipped - 4 lines]
> rid of this annoying pop up without changing the Word document by Word VBA
> coding?