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

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
 
M

Matt Fletcher

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?
 
H

Ha See Hung

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top