Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Option Explicit
Public intNoPrint As Integer
Sub FilePrint()
'Overrides the File Print command
If intNoPrint = 1 Then MsgBox "This document can not be printed."
End Sub
Sub FilePrintDefault()
'Overrides the Print button
If intNoPrint = 1 Then MsgBox "This document can not be printed."
End Sub
Sub NewPrint()
If intNoPrint = 1 Then MsgBox "This document can not be printed."
End Sub
Sub MailMergeToPrinter()
'Overrides Alt+Shift+M
If intNoPrint = 1 Then MsgBox "This document can not be printed."
End Sub
Sub OptionsPrint()
If intNoPrint = 1 Then MsgBox "This document can not be printed."
End Sub
Sub AutoOpen()
Dim uName As String
uName = Application.UserName
' obviously you want to change this
If uName = "Bob" Then intNoPrint = 1
End Sub
When "Bob" opens the file, he can typed, edit, save...but not print.
Gerry
Sub AutoOpen()
Dim uName As String
uName = Application.UserName
Select Case uName
Case "Bob", "Harry", "TheGuyWhoCanPrint"
intNoPrint = 0
Case Else
intNoPrint = 1
End Select
End Sub