Find a contact in contact folder using ATL VC++

  • Thread starter Thread starter Rohan lotlikat
  • Start date Start date
R

Rohan lotlikat

Hi,

I have a little problem with MS OutLook 2003 Addin. Im trying to Find a
contact to check if its already present in the contact list. But i dont see
and wayout.

I tried following:
m_pApp->GetNamespace(L"MAPI",&nameSpace);
nameSpace->GetDefaultFolder(olFolderContacts ,&mCFolder);
mCFolder->get_Items(&pContactItems);
IDispatch * pDisp;
pContactItems->Find(L"(e-mail address removed)",&pDisp);

But this does not help .

How can i check if particular email address is already present in the
Outlook contact list of the user?

please help

Regards
Rohan
 
Not sure how it would be in VC++, but in C# it would be like this:

pContactItems.Find("[Email1] = '(e-mail address removed)'");

hope that helps.
rog
 
pContactItems->Find(L"[Email1Address] = (e-mail address removed)",&pDisp);
 
Hey thanx guys

Mark your solution works.Thanx.

Roger thanx for helping. :)

Regards
Rohan
 
Back
Top