Microsoft Word – Prevent Printing
Like many others, we try and discourage users from printing documents unnecessarily and instead send or share them electronically. However, this doesn’t always work and documents are still printed.
With this simple solution, if the user tries to print, a dialog box immediately appears informing the user “This document cannot be printed” (or words of your choosing!) and the print command is cancelled.
You can prevent Word from printing a document by adding a small peice of code which will disable Ctrl+P, File > Print, and the Print toolbar button.
From within your document (or template), click on Tools > Macros > Visual Basic Editor (or Alt+F11).
In the top left window, double click on ‘ThisDocument’.
Simply paste the code below into the code window on the right, change the message you wish to be displayed, and press Save. Close the Visual Basic Editor, and close your document.
The next time this document is opened, the code will take effect and printing is disabled.
This technique can also be applied to your company templates so that all documents have this feature installed by default.
Dim WithEvents WordApp As Application Private Sub Document_New() Set WordApp = Application End Sub Private Sub Document_Open() Set WordApp = Application End Sub Private Sub WordApp_DocumentBeforePrint(ByVal Doc As Document, Cancel As Boolean) 'Text displayed to the user if they try to print strMessage = "This document cannot be printed." MsgBox strMessage, vbOKOnly + vbExclamation, "Print" Cancel = True End Sub