Print Preview Doesn't Trigger BeforePrint Event

J

JT Klipfer

I am using a BeforePrint event to update custom headers & footers in a Word
2003 document. Problem is that Print Preview doesn't trigger the BeforePrint
event, only by selecting print or QuickPrint does the event fire.

I have a similar set of requirements in an Excel Addin that I created, but
both the Print and Print Preview functions trigger the BeforePrint event.

Any ideas?
 
G

GF

That does appear to be the case in Word, unfortunately.

One workaround might be to trap the FilePrintPreview command, and insert
your custom code to update the headers/footers:

Sub FilePrintPreview()
'Your code to update headers/footers here
ActiveDocument.PrintPreview
End Sub

hth,
GF
 
Top