Get Contact data from Outlook
I am trying to write a program to get contact data form outlook. I can get name, number,....
But there are still some issue bother me:
1. How to tell the difference between normal contact and the "Contact group"? And how to get the members of a specific "Contact group"
In outlook user can create a "Group" to include some saved contact. But when I use
_ContactItemPtr spContact;
.....
CString name = spContact->GetFullName();
.....
program crashed. So I want to know how to aware the Item I get is or isn't a "Contact group".
2. When I use
CString mail = _com_util::ConvertStringToBSTR(spContact->GetEmail1Address());
Sometimes I get the "/o=TDC/ou=TDC/cn=Recipients/cn=evonne" format.
But what I saw in outlook is "evonne@tdc.com". What API should I call to get the "evonne@tdc.com" format data not the previous one?
Thanks a lot!