Welcome toWord.Tips.Net
Ask a Word Question
Make a Comment
Learn Access Now
Free Printable Forms
Beauty Tips
Car Tips
Cleaning Tips
College Tips
Cooking Tips
Excel2007 Tips
ExcelTips
Family Tips
Gardening Tips
Health Tips
Home Tips
Legal Tips
Money Tips
Organizing Tips
Pest Tips
Pet Tips
Wedding Tips
Word2007 Tips
WordTips
Collapsing and Expanding Subdocuments
Marie asked for a way to change the defaults in the Print dialog box so that she could, by default, simply print the current page. Unfortunately, there is no way to change the defaults; Word always resets them to its internal settings whenever the Print dialog box is first displayed. However, there are a couple of ways you can work around this problem.
The first method is to simply record a simple macro that prints the current page. Once recorded, you can assign the macro to the toolbar or give it a shortcut key. (How you do these things has been covered in other issues of WordTips.) Now you don't even need to pull up the regular Print dialog box to print the current page—you have your own macro that does the work for you with a single click. The following is an example of such a VBA macro:
Sub PrintCurrentPage()
Application.PrintOut FileName:="", Range:=wdPrintCurrentPage, _
Item:= wdPrintDocumentContent, Copies:=1, Pages:="", _
PageType:=wdPrintAllPages, Collate:=False, _
Background:=True, PrintToFile:=False
End Sub
If you would like something that really does change the settings in the Print dialog box, you can only do so using a macro. Understand, this approach doesn't change the defaults, but changes the settings. Thus, when you call the macro, the Print dialog box is invoked and the settings changed from the defaults by the macro. This may sound a bit confusing, but it simply means that any number of setting changes are made for you before you have the chance to view the Print dialog box.
Public Sub PrintCurrentPageDialog()
With Dialogs(wdDialogFilePrint)
.Range = wdPrintCurrentPage
.Show
End With
End Sub
In this case, the VBA macro sets the Range value in the Print dialog box to the current page before showing it. Once the dialog box is shown, the macro is over and you can manually make other dialog box setting changes, as desired.
It is interesting to note that if you name the foregoing macro FilePrint (instead of PrintCurrentPageDialog), then the macro essentially replaces the built-in Word command that comes into play when you select Print from the File menu. Thus, you have changed (ever so slightly) what the built-in Word command does.
Tip #1487 applies to Microsoft Word versions: 97 2000 2002 2003 2007
More Power! For some people, the prospect of creating Word macros can be scary. WordTips: The Macros can help you conquer your fears and you'll discover you're much more confident and productive as you make Word do exactly what you want. This is an invaluable source for learning macros. You are introduced to the topic in bite-sized chunks, pulled from past issues of WordTips. Learn at your own pace, exactly the way you want.