Want to get rid of the Word warning dialogue

O

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
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?
 
J

Jean-Guy Marcil

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
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?

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

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
O

Oscar

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
 
C

Cindy M.

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
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?
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 :)
 
C

Cindy M.

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.

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 :)
 
J

Jean-Yves

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
 

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