Suppress "outside of printable area" warning prompt when printing?

I

Ian R

Hi

I'm using Word 2002 SP3 under Windows XP.

I have created a number of documents where I've squeezed as much as needed
to fit on the page. But this required setting the margins just outside of
the printable area. They print OK but every time I print them I get a
warning prompt...

"The margins of section one are set outside of the printable area of the
page. Do you want to continue?"

This is irritating when I'm printing several different documents.

Is there a way I can suppress this warning prompt for specific documents?

Thanks for any info and your time.

Ian
 
L

Lene Fredborg

You can obtain what you want by using a macro when printing the special
documents and using the standard Print command for other print jobs (it is
actually possible to change the built-in Print command but in your case I
recommend that you keep it unchanged).

Two different macro versions are included below. Both macro versions
suppress the margins warning. If you add one of the macros to your
Normal.dot, you can use that macro for printing your special documents. You
could assign a keyboard shortcut to the macro or assign the macro to a
toolbar button in order to make it easy to print your documents.

-------------------
Macro 1- prints the active document without showing the Print dialog box:

Sub Print_ShowNoWarning_1()
With Application
'Turn off DisplayAlerts
.DisplayAlerts = wdAlertsNone
'Print document
'Background print must be turned off to prevent message
.PrintOut Background:=False
'Turn on DisplayAlerts again
.DisplayAlerts = wdAlertsAll
End With
End Sub

------------------------
Macro 2 - shows the Print dialog box. Use this version if you want to be
able to specify other print settings:


Sub Print_ShowNoWarning_2()
Dim bPrintBackgroud As Boolean

'Save current setting of background printing
bPrintBackgroud = Options.PrintBackground

Options.PrintBackground = False
'Turn off DisplayAlerts
Application.DisplayAlerts = wdAlertsNone
Dialogs(wdDialogFilePrint).Show
'Turn on DisplayAlerts again
Application.DisplayAlerts = wdAlertsAll

'Set original background printing setting
Options.PrintBackground = bPrintBackgroud
End Sub

--
Regards
Lene Fredborg
DocTools – Denmark
www.thedoctools.com
Document automation – add-ins, macros and templates for Microsoft Word
 
I

Ian R

Ian R said:
Hi

I'm using Word 2002 SP3 under Windows XP.

I have created a number of documents where I've squeezed as much as needed
to fit on the page. But this required setting the margins just outside of
the printable area. They print OK but every time I print them I get a
warning prompt...

"The margins of section one are set outside of the printable area of the
page. Do you want to continue?"

This is irritating when I'm printing several different documents.

Is there a way I can suppress this warning prompt for specific documents?

Thanks for any info and your time.

Ian


Lene

Thank you very much for replying and the macros too!

Fantastic! More than I could have wished for!

I shall be investigating DocTools

Happy New Year

Ian I^)
 

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