Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.pagelayout
B Carlson B Carlson is offline
external usenet poster
 
Posts: 1
Default How do I suppress the 'print outside margins' error?

I am trying to print a very long document in Word 2002 with dozens (if not
hundreds) of sections in it. Regardless of the settings I tweak, I get this
message for every section:

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

How do I suppress this message so I can print the entire document without
having to click "OK" dozens (if not hundreds) of times? I saw another post
about how to do this with VBA, but I don't have that, so I'm hoping for a
solution within Word itself.

Thanks for your help!

  #2   Report Post  
Posted to microsoft.public.word.pagelayout
Lene Fredborg Lene Fredborg is offline
external usenet poster
 
Posts: 1,291
Default How do I suppress the 'print outside margins' error?

You need a macro to prevent the warning. When you have Word, I am quite sure
you also have VBA - it is included. See the links at the end of this post for
help on installing macros.

If you install one of the macros below, you can use that macro when you
print documents like the one you describe and use the standard Print command
for "normal" documents.

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

For help on installing macros, see:
http://www.gmayor.com/installing_macro.htm
For help on assigning a macro to a toolbar, see:
http://word.mvps.org/FAQs/Customizat...oToToolbar.htm
For help on assigning keyboard shortcuts, see:
http://www.word.mvps.org/FAQs/Custom...roToHotkey.htm

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


"B Carlson" wrote:

I am trying to print a very long document in Word 2002 with dozens (if not
hundreds) of sections in it. Regardless of the settings I tweak, I get this
message for every section:

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

How do I suppress this message so I can print the entire document without
having to click "OK" dozens (if not hundreds) of times? I saw another post
about how to do this with VBA, but I don't have that, so I'm hoping for a
solution within Word itself.

Thanks for your help!

  #3   Report Post  
Posted to microsoft.public.word.pagelayout
B Carlson[_2_] B Carlson[_2_] is offline
external usenet poster
 
Posts: 1
Default How do I suppress the 'print outside margins' error?

Excellent! I'll give that a shot. Thank you very much!

"Lene Fredborg" wrote:

You need a macro to prevent the warning. When you have Word, I am quite sure
you also have VBA - it is included. See the links at the end of this post for
help on installing macros.

If you install one of the macros below, you can use that macro when you
print documents like the one you describe and use the standard Print command
for "normal" documents.

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

For help on installing macros, see:
http://www.gmayor.com/installing_macro.htm
For help on assigning a macro to a toolbar, see:
http://word.mvps.org/FAQs/Customizat...oToToolbar.htm
For help on assigning keyboard shortcuts, see:
http://www.word.mvps.org/FAQs/Custom...roToHotkey.htm

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


"B Carlson" wrote:

I am trying to print a very long document in Word 2002 with dozens (if not
hundreds) of sections in it. Regardless of the settings I tweak, I get this
message for every section:

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

How do I suppress this message so I can print the entire document without
having to click "OK" dozens (if not hundreds) of times? I saw another post
about how to do this with VBA, but I don't have that, so I'm hoping for a
solution within Word itself.

Thanks for your help!

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
margins Error Nasrin Mailmerge 1 June 18th 07 01:03 PM
Suppress error messages when merging in batch [email protected] Mailmerge 1 June 15th 07 11:48 AM
Can you can suppress images to not print in Word 2007 Ron M New Users 1 March 20th 07 10:41 PM
How to suppress a message before a print Sam Goddard Page Layout 1 February 4th 05 10:08 PM
Can I suppress the "outside of margins" print message? Shauna Kelly New Users 1 November 28th 04 08:38 AM


All times are GMT +1. The time now is 07:05 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"