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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top