Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.word.pagelayout
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.word.pagelayout
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.word.pagelayout
|
|||
|
|||
![]()
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 | |
|
|
![]() |
||||
Thread | Forum | |||
margins Error | Mailmerge | |||
Suppress error messages when merging in batch | Mailmerge | |||
Can you can suppress images to not print in Word 2007 | New Users | |||
How to suppress a message before a print | Page Layout | |||
Can I suppress the "outside of margins" print message? | New Users |