Stop Print message

T

Tonya Marshall

I have a document that the margins are set outside the printer's margins. I
would like to stop the message that comes up informing me that the margins
are set outside the printable area. The macro I use is for printing the
current page rather than the whole document.
 
D

Doug Robbins - Word MVP - DELETE UPPERCASE CHARACT

Hi Tonya,

Try inserting

Application.DisplayAlerts = wdAlertsNone

into your code. You should turn them back on with

Application.DisplayAlerts = wdAlertsAll

afterwards.

Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 
T

Tonya Marshall

Well I tried inserting it into the print page macro in the template, I tried
making it an AutoOpen macro. Still getting the message. I even tried running
it as a macro by itself. Still get the message no matter what I do with it.
I have a PrintPage macro in a startup template and I even tried putting it
in there.

This is the current macro I have in the template that the document with the
margins outside the printable area:

Sub NoPrintDialog()
ActiveDocument.PrintOut Range:=wdPrintCurrentPage
Application.DisplayAlerts = wdAlertsNone

--

Tonya Marshall
email: tonz AT harborside DOT com

"Doug Robbins - Word MVP - DELETE UPPERCASE CHARACTERS FROM EMAIL ADDRESS"
 
T

Tonya Marshall

Well I bit the bullet and fixed the margins. Even though the table strays
outside the right and left margins, I don't get a message - the table
borders are turned off so it doesn't matter.
 
J

Jay Freedman

It may not matter for this document any more, but for the record...

If you're going to turn off .DisplayAlerts, you have to do it *before*
the .PrintOut statement; doing it afterward is too late because the
message has already been displayed.
 
T

Tonya Marshall

That's OK, I still had another template I could test it out on. Still no
joy:

Sub NoPrintDialog()
Application.DisplayAlerts = wdAlertsNone
ActiveDocument.PrintOut Range:=wdPrintCurrentPage
End Sub

If it were going to work, I would think the AutoOpen macro I tried would do
it.
 

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