From: JT Klipfer on 8 Oct 2009 13:58 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 11 Oct 2009 02:30 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?
|
Pages: 1 Prev: Best practice for SendKeys or equivalent Next: Can't toggle togglebutton on ribbon |