J
JimTonra
I'm trying to use the command repurposing feature to grab control of the File
Print operation so I can decide based on the document content if the print
should be allowed.
I'm using the following XML in my GetCustomUI callback
....
<commands>
<command idMso="FilePrint" onAction="myPrint"/>
</Commands>
....
I'm using c++ (ATL) for the addin and have the following signature for my
onAction callback function:
idl:
[id(3), helpstring("method myPrint")] HRESULT myPrint([in] IDispatch*
RibbonControl, [out,retval] VARIANT_BOOL* pvarfCancelDefault);
c++
STDMETHODIMP CConnect::myPrint(IDispatch* RibbonControl, VARIANT_BOOL*
pvarfCancelDefault)
When I include this in my Ribbon XML, the File Print operation becomes a
no-op and my callback function is never called. Do I have the signature
wrong for this callback or is there something else I'm missing?
Print operation so I can decide based on the document content if the print
should be allowed.
I'm using the following XML in my GetCustomUI callback
....
<commands>
<command idMso="FilePrint" onAction="myPrint"/>
</Commands>
....
I'm using c++ (ATL) for the addin and have the following signature for my
onAction callback function:
idl:
[id(3), helpstring("method myPrint")] HRESULT myPrint([in] IDispatch*
RibbonControl, [out,retval] VARIANT_BOOL* pvarfCancelDefault);
c++
STDMETHODIMP CConnect::myPrint(IDispatch* RibbonControl, VARIANT_BOOL*
pvarfCancelDefault)
When I include this in my Ribbon XML, the File Print operation becomes a
no-op and my callback function is never called. Do I have the signature
wrong for this callback or is there something else I'm missing?