Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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).

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

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).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.