views:

190

answers:

0

I'm writing an add-on to bypass the printer confirmation dialog in C++. I can successfully intercept a print call, however when I try to print the document, the dialog still comes up. I'm catching the event in:

STDMETHOD(Exec)(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdExecOpt, VARIANTARG *pvaIn, VARIANTARG *pvaOut)

and sending it off with:

return m_spDefaultOleCommandTarget->Exec(pguidCmdGroup, OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER, pvaIn, pvaOut);

What am I doing wrong?

Thanks,

Rich