J
James Callahan
I have built a C++ COM Addin for Outlook. All of the
reference material says I can access the Outllok Object
Model for Contacts as follows:
_ApplicationPtr pApp;
_ItemsPtr pItems;
MAPIFolderPtr pFolder;
_ContactItemPtr pContact;
hr=pApp.CreateInstance(__uuidof(Application));
pFolder = pApp->GetNamespace(_bstr_t("MAPI"))
->GetDefaultFolder(olFolderContacts);
pItems = pFolder->GetItems();
pContact = pItems->GetFirst();
Unfortunately, I get an error when I try to compile which
states that the GetNamespace does not take one parameter.
How can get to the interfaces in the mso.dll? I am using
the following import command:
#import "C\<my location>\mso.dll"
rename_namespace("Office"),named_guids
using namespace Office;
#import "C:\<my location>\MSOUTL.OLB"
rename_namespace("Outlook"), raw_interfaces_only,
named_guids
using namespace Outlook;
Thanks in advance,
James
reference material says I can access the Outllok Object
Model for Contacts as follows:
_ApplicationPtr pApp;
_ItemsPtr pItems;
MAPIFolderPtr pFolder;
_ContactItemPtr pContact;
hr=pApp.CreateInstance(__uuidof(Application));
pFolder = pApp->GetNamespace(_bstr_t("MAPI"))
->GetDefaultFolder(olFolderContacts);
pItems = pFolder->GetItems();
pContact = pItems->GetFirst();
Unfortunately, I get an error when I try to compile which
states that the GetNamespace does not take one parameter.
How can get to the interfaces in the mso.dll? I am using
the following import command:
#import "C\<my location>\mso.dll"
rename_namespace("Office"),named_guids
using namespace Office;
#import "C:\<my location>\MSOUTL.OLB"
rename_namespace("Outlook"), raw_interfaces_only,
named_guids
using namespace Outlook;
Thanks in advance,
James