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 attached code 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 ApplicationPrivate Sub Document_New() Set WordApp = ApplicationEnd SubPrivate Sub Document_Open() Set WordApp = ApplicationEnd SubPrivate 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 = TrueEnd Sub
Comments (0)