How to gain access to the Outlook object model from Visual C++

  • Thread starter Thread starter Ha See Hung
  • Start date Start date
H

Ha See Hung

Can anyone out there please enlighten me on how to gain access to the
Outlook object model from Visuall C++?

Using the following function, one can obtain an IDispatch pointer to the
native object model of Word, Excel and Powerpoint, but I have not been able
to do so with MS Outlook:-

HRESULT hr = AccessibleObjectFromWindow(GetFocus(), OBJID_NATIVEOM,
IID_IDispatch, (void**) &pDisp);

Help from anyone will be very much appreciated.

Bennet
 
The standard way is to write a COM add-in which implements
IDTExtensibility2 - the IDispatch pointer to the application object will be
passed to your add-in as the first parameter to OnConnection. Or am I
missing the point of your question?
 
Thank you. But this is the way to do in VB. Can anybody advise me on how
to obtain an IDispatch pointer to the Outlook object model from Visual C++?

Bennet
 
Back
Top