Have a go with the following but *please* be sure to re-enable when done.
Sub test()
' True enable, False Disable all the Print buttons & shortcut
PrintEnable True '
End Sub
Sub PrintEnable(bEnable As Boolean)
Dim i As Long
Dim cbr As CommandBar
Dim crt As CommandBarControl
Dim cPrt As CommandBarControl
arr = Array(4, 109, 2521)
For Each cbr In CommandBars
For i = 0 To 2
Set cPrt = cbr.FindControl(ID:=arr(i), Recursive:=True)
If Not cPrt Is Nothing Then
cPrt.Enabled = bEnable
' Debug.Print cbr.Name, cPrt.ID, cPrt.Caption
Set cPrt = Nothing
End If
Next
Next
If bEnable Then
Application.OnKey "^p"
Else
Application.OnKey "^p", "DisableCtrlPrint"
End If
End Sub
Sub DisableCtrlPrint()
' MsgBox "This macro does nothing"
End Sub
You might find it surprising to uncomment the debug line to see how in how
many places the print buttons exist.
Regards,
Peter T