Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Workbook_BeforePrint macro Otto Moehrbach Excel Programming 5 November 27th 06 04:29 AM
Workbook_BeforePrint Wayne Excel Programming 2 February 7th 06 07:27 AM
Workbook_BeforePrint performs twice ? Peter[_21_] Excel Programming 3 November 29th 04 01:24 AM
Workbook_BeforePrint Squid[_2_] Excel Programming 2 May 11th 04 04:18 PM
Problem - Workbook_BeforePrint JON-JON Excel Programming 3 August 26th 03 01:19 PM


All times are GMT +1. The time now is 06:10 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"