Group:  Microsoft Outlook ยป microsoft.public.outlook.program_addins
Thread: Is it possible to get Outlook 2003 Integration API from OOM or MAP

Geek News

Is it possible to get Outlook 2003 Integration API from OOM or MAP
Rui Feng 8/28/2006 5:27:01 PM
Hi all.

I can get objects in MAPI from OOM (Outlook Object Module) using this way:

// Application from IDispatch
CComQIPtr < Outlook::_Application > spApp(Application);
CComPtr < Outlook::_NameSpace > spNameSpace;
_bstr_t bstrType("MAPI");
spApp->GetNamespace(bstrType, &spNameSpace);
CComPtr < IMAPISession > spMAPISession;
CComPtr < IUnknown > spUnknown;
spNameSpace->get_MAPIOBJECT(&spUnknown);
spUnKnown->QueryInterface(IDD_IMAPISession, (void **)&spMAPISession);

I wander whether I can have the same way to get Outlook 2003 Integration
API, for example, to get IOlkAccountManager.

Thank you.

Re: Is it possible to get Outlook 2003 Integration API from OOM or MAP
"Dmitry Streblechenko" <dmitry[ at ]dimastr.com> 8/28/2006 5:47:50 PM
No, since accounts are not at all exposed in Outlook 2003.
Why can't you create a new instance of the IOlkAccountManager interface just
like the integration API suggests?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Rui Feng" <RuiFeng[ at ]discussions.microsoft.com> wrote in message
news:0ABA26E1-22AD-4F4B-A420-4248317FBA11[ at ]microsoft.com...
[Quoted Text]
> Hi all.
>
> I can get objects in MAPI from OOM (Outlook Object Module) using this way:
>
> // Application from IDispatch
> CComQIPtr < Outlook::_Application > spApp(Application);
> CComPtr < Outlook::_NameSpace > spNameSpace;
> _bstr_t bstrType("MAPI");
> spApp->GetNamespace(bstrType, &spNameSpace);
> CComPtr < IMAPISession > spMAPISession;
> CComPtr < IUnknown > spUnknown;
> spNameSpace->get_MAPIOBJECT(&spUnknown);
> spUnKnown->QueryInterface(IDD_IMAPISession, (void **)&spMAPISession);
>
> I wander whether I can have the same way to get Outlook 2003 Integration
> API, for example, to get IOlkAccountManager.
>
> Thank you.
>


Re: Is it possible to get Outlook 2003 Integration API from OOM or
Rui Feng 8/29/2006 7:10:02 AM
Yeah. I did as you said and it works.
Thank you. :-)

"Dmitry Streblechenko" wrote:

[Quoted Text]
> No, since accounts are not at all exposed in Outlook 2003.
> Why can't you create a new instance of the IOlkAccountManager interface just
> like the integration API suggests?
>
> Dmitry Streblechenko (MVP)
> http://www.dimastr.com/
> OutlookSpy - Outlook, CDO
> and MAPI Developer Tool
>
> "Rui Feng" <RuiFeng[ at ]discussions.microsoft.com> wrote in message
> news:0ABA26E1-22AD-4F4B-A420-4248317FBA11[ at ]microsoft.com...
> > Hi all.
> >
> > I can get objects in MAPI from OOM (Outlook Object Module) using this way:
> >
> > // Application from IDispatch
> > CComQIPtr < Outlook::_Application > spApp(Application);
> > CComPtr < Outlook::_NameSpace > spNameSpace;
> > _bstr_t bstrType("MAPI");
> > spApp->GetNamespace(bstrType, &spNameSpace);
> > CComPtr < IMAPISession > spMAPISession;
> > CComPtr < IUnknown > spUnknown;
> > spNameSpace->get_MAPIOBJECT(&spUnknown);
> > spUnKnown->QueryInterface(IDD_IMAPISession, (void **)&spMAPISession);
> >
> > I wander whether I can have the same way to get Outlook 2003 Integration
> > API, for example, to get IOlkAccountManager.
> >
> > Thank you.
> >
>
>
>

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net