macro help required

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I have created a macro to auto print out a document all works fine except i
get a message saying the margins are ser outside the printable area of the
page, and i have to click YES for it continue. Is there a way i can tell word
to either enter yes automatically or the macro to bypass any messages like
this

Thanks in advance

the existing macro line i am using is

Application.PrintOut FileName:= _
"C:\Documents and Settings\testprint.doc", Range:= _
wdPrintAllDocument, Item:=wdPrintDocumentContent, Copies:=1,
Pages:="", _
PageType:=wdPrintAllPages, Collate:=True, Background:=True,
PrintToFile:= _
False, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
PrintZoomPaperHeight:=0
 
Hi =?Utf-8?B?c3RldmUucw==?=,
I have created a macro to auto print out a document all works fine except i
get a message saying the margins are ser outside the printable area of the
page, and i have to click YES for it continue. Is there a way i can tell word
to either enter yes automatically or the macro to bypass any messages like
this
Well, you could try

Application.DisplayAlerts = wdAlertsNone

But no guarantees. You may need to go after the root of the problem, in the
document itself.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
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 :-)
 
steve.s said:
Hi

I have created a macro to auto print out a document all works fine except i
get a message saying the margins are ser outside the printable area of the
page, and i have to click YES for it continue. Is there a way i can tell word
to either enter yes automatically or the macro to bypass any messages like
this

Thanks in advance

the existing macro line i am using is

Application.PrintOut FileName:= _
"C:\Documents and Settings\testprint.doc", Range:= _
wdPrintAllDocument, Item:=wdPrintDocumentContent, Copies:=1,
Pages:="", _
PageType:=wdPrintAllPages, Collate:=True, Background:=True,
PrintToFile:= _
False, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
PrintZoomPaperHeight:=0

I had the same problem. The only solution I found was To turn off
Background printing (Application.BackgroundPrinting = False) and to Set
DisplayAlerts to wdAlertNone (Application.DisplayAlerts = wdAertNone).
Without Background off display alerts will have no effect for this issue.

Note, if you have any of the margins set to 0 you will always recieve this
message, therefore you can test first for this. The other case that cause
this msg dialog to appear, I am not sure.
 

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

Back
Top