Lock print area in Word

Human_doing

Board Regular
Joined
Feb 16, 2011
Messages
137
Hi all,

Does anyone know how to 'lock' Word so that when the file is opened, people can only view and can only print a certain section? I have a document with a form at the end, easy enough to get the hyperlink to open to the correct page but then inevitably they print all 20 pages rather than just the last 2 page form :)

Thanks!
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
if you make it a macro enabled word file, you can create a command button to print. Code below would be for a CommandButton1 that disappears as much as possible, prints the form, and then reappears.

Code:
Private Sub CommandButton1_Click()

    Dim intHeight As Integer
    Dim intWidth As Integer
    
    intHeight = Me.CommandButton1.Height
    intWidth = Me.CommandButton1.Width

    Me.CommandButton1.Height = 0.75
    Me.CommandButton1.Width = 0.75


    Application.PrintOut FileName:="", Range:=wdPrintRangeOfPages, Item:= _
        wdPrintDocumentWithMarkup, Copies:=1, Pages:="2-3", PageType:= _
        wdPrintAllPages, Collate:=True, Background:=True, PrintToFile:=False, _
        PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
        PrintZoomPaperHeight:=0

    Me.CommandButton1.Height = intHeight
    Me.CommandButton1.Width = intWidth
    

End Sub

It will print to the user's default printer.
 
Upvote 0
Word has no native way of doing this. Macro solutions are unreliable, as that requires the reader to enable macros when the document is opened (unless opened from what is for them a trusted location). The CommandButton sub posted by anthonya assumes your users are doing everything via a userform.

If the content that your users are intended to not print is never supposed to be printed, you could embed it all in a field code that suppresses it at print time. That approach doesn't require any macros. For details, see the discussions under 'Use Date (And/Or Time) Comparisons To Vary Text' in my Microsoft Word Date Calculation Tutorial, at:
Microsoft Word Date Calculation Tutorial | Windows Secrets Lounge
or:
Graham Mayor - Downloads
 
Upvote 0

Forum statistics

Threads
1,225,681
Messages
6,186,411
Members
453,352
Latest member
OrionF

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top