From: JT Klipfer on
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?
From: GF on

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

"JT Klipfer" wrote:

> 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?