#1   Report Post  
steve.s
 
Posts: n/a
Default macro help required

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


  #2   Report Post  
Cindy M -WordMVP-
 
Posts: n/a
Default

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

  #3   Report Post  
Tracie
 
Posts: n/a
Default

Hi Steve - I'm having exactly the same problem. Do you have an answer yet?

Thanks

Tracie

"steve.s" wrote:

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


  #4   Report Post  
Yehuda
 
Posts: n/a
Default



"steve.s" wrote:

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.
Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Table in a Form HiDbLevel Tables 12 February 27th 06 12:59 PM
Possible bug when recording a Word Macro Raven95 Microsoft Word Help 4 April 30th 05 09:49 PM
Running document macro from server Intravler New Users 0 March 4th 05 04:33 AM
Save As is not working due to macro security settings Craig Meritz Microsoft Word Help 1 December 16th 04 03:53 AM
2000 to 2002 macro and "Could not open macro storage" Art Farrell Mailmerge 1 December 6th 04 12:40 PM


All times are GMT +1. The time now is 06:52 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"