Ok,
I don't think there is a foolproof way to capture all different ways of choosing print/print preview but this should get you off to a good start.
In the VB Editor insert a class module and use this code:-
Option Explicit
Private WithEvents btnPrint As Office.CommandBarButton
Private WithEvents btnPrintPreview As Office.CommandBarButton
Private Sub btnPrint_Click(ByVal Ctrl As Office.CommandBarButton, CancelDefault As Boolean)
'Print was pressed
CancelDefault = True
MsgBox "Print was pressed but I ain't printing!"
'Do whatever you feel need
End Sub
Private Sub btnPrintPreview_Click(ByVal Ctrl As Office.CommandBarButton, CancelDefault As Boolean)
'Print preview was pressed
CancelDefault = True
MsgBox "How rude, you clicked Print Preview"
'Now do whatever you want
End Sub
Public Sub SetPrintPreview(btn As Office.CommandBarButton)
Set btnPrintPreview = btn
End Sub
Public Sub SetPrint(btn As Office.CommandBarButton)
Set btnPrint = btn
End Sub
Then in a normal module use this procedure:-
Option Explicit
Public cBar As New Class1
Sub Initiate()
Dim combar As CommandBar
Dim compop As CommandBarPopup
Dim combut As CommandBarButton
'First capture Print preview button being pressed
Set combar = Application.CommandBars("Worksheet Menu Bar")
Set compop = combar.Controls("File")
Set combut = compop.Controls(11)
cBar.SetPrintPreview combut
'Now set up print button being pressed
Set combut = compop.Controls(12)
cBar.SetPrint combut
End Sub
I've done a quick check and it captures the Print option from the File menu, Print preview from the file menu and the print preview button from the Standard toolbar. You should be able to modify the code to include the Print button from the standard toolbar (I've no idea why this isn't captured by the code as it is).
The user will still be able to do things like File, Page Setup, Print Preview. I guess you could disable the Page setup button.
Let me know how you get on,
Regards,
D