Set default to print only certain pages in MS Word

microsoft wordprinting

How can I set an MS Word document to only print the first x pages by default? I have a large document, but I don't want people who print it out to accidentally print the whole thing instead of the first 11 pages (which I want them to print).

Best Answer

I believe the only way to do this is by creating a macro.

Add your preferred code to your macro, and change X & Y to desired range (in your case 1 & 11).


Use this code if you want to it show the print dialog and allow selection of any range, but just set default to pages X-Y:

Sub FilePrint()
  With ActiveDocument
       ' unprotect
       If .ProtectionType <> wdNoProtection Then
          .Unprotect Password:="snip"
       End If
       .Bookmarks("RunSpellCheckButton").Range.Font.Hidden = True
        With Dialogs(wdDialogFilePrint)
            .Range = wdPrintFromTo
            .From = X
            .To = Y
            .Show
        End With
      .Bookmarks("RunSpellCheckButton").Range.Font.Hidden = False
       ' reprotect
      .Protect Type:=wdAllowOnlyFormFields, NoReset:=True, Password:="snip"
  End With
End Sub

Use this code if you want it to automatically print X-Y pages when running the macro, without showing the print dialog first:

Sub FilePrint()
  With ActiveDocument
       ' unprotect
       If .ProtectionType <> wdNoProtection Then
          .Unprotect Password:="snip"
       End If
       .Bookmarks("RunSpellCheckButton").Range.Font.Hidden = True
      .PrintOut Range:=wdPrintFromTo, From:="X", To:="Y"
      .Bookmarks("RunSpellCheckButton").Range.Font.Hidden = False
       ' reprotect
      .Protect Type:=wdAllowOnlyFormFields, NoReset:=True, Password:="snip"
  End With
End Sub

Credit: Jay Freedman (Microsoft MVP).

Related Question