![]() |
Equivalent of Workbook_BeforePrint in C++?
I had a plugin for Excel written in C++, with an event sink. Another
functionality request to add was to validate certain data before printing the workbook. If the data can not be validated correctly, then the print job must be canceled. The event sink can get the print event correctly in the Invoke() method (inherited from IDispatch), but how can I cancel the print job? In VBA, you can set the cancel flag to true in Workbook_BeforePrint subroutine, but there does not seem to have an equivalent in C++. The question is, how can I cancel the print job from inside the Invoke() function, or at least, tell Excel that it should not continue with printing? Thanks in advance |
All times are GMT +1. The time now is 04:31 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com