C
ccccoder
Hi,
I need to add a new functionality to an existing Excel addin developed in
C++ (ATL/COM), which would try to validate the workbook data before the
workbook is printed. If the data validation fails, then I want Excel to
cancel the print job.
We have an event sink, and get the event just fine when printing is
requested. The problem is, how could I tell Excel to cancel the job?
In VBA, I can set the cancel flag to true in Workbook_BeforePrint. But in
C++, there does not seem to have an equivalent of the Workbook_BeforePrint
subroutine, and no way to replace it like in VBA.
But how I tell Excel to cancel the print job in that case? Doing the work in
VBA is not an object, as the project was initially in VBA, and we rewrote
everything in C++ due to all kinds of macro loading problems. So, no way to
go back. Not an option to use interop library either, as we don't do managed
code.
Thanks in advance
ccccoder
I need to add a new functionality to an existing Excel addin developed in
C++ (ATL/COM), which would try to validate the workbook data before the
workbook is printed. If the data validation fails, then I want Excel to
cancel the print job.
We have an event sink, and get the event just fine when printing is
requested. The problem is, how could I tell Excel to cancel the job?
In VBA, I can set the cancel flag to true in Workbook_BeforePrint. But in
C++, there does not seem to have an equivalent of the Workbook_BeforePrint
subroutine, and no way to replace it like in VBA.
But how I tell Excel to cancel the print job in that case? Doing the work in
VBA is not an object, as the project was initially in VBA, and we rewrote
everything in C++ due to all kinds of macro loading problems. So, no way to
go back. Not an option to use interop library either, as we don't do managed
code.
Thanks in advance
ccccoder