Handle the Workbook_BeforePrint event.
private sub Workbook_BeforePrint (cancel as boolean)
'
'
if not g_MyFlag then cancel = true: exit sub
end sub
In MS Word, you can also override the system macro itself. You will need to create a macro with a name FilePrint(), and Word will be its own instead. Too bad you can't do this in Excel.
GSerg source
share