![]() Here's the quick and dirty (didn't include error checking): ![]() When you iterate through the contacts in this code, call MAPIOBJECT on the contact, then through that get the email and name of the contact to get around the security warning. That's a working sample of how to use extend mapi. Here's what you're looking for (and what i was looking for and found): For example, to import Appointment Items from a Calendar folder one just needs to makeĪn object of _AppointmentItemPtr smart pointer class instead of _ContactItemPtr. This includesĪppointment Items, Email Messages, Notes, Tasks, and more. This sample imports contact information but a slight modification willĮnable this to import any other information from Outlook as well. StrTemp=( char *)pContact- >GetFullName() MessageBox( " Unabel to get Contact Items.", MessageBox( " Select folder is not a Contact folder.", ![]() ![]() If (pFolder- >GetDefaultItemType()!=olContactItem) PFolder=pApp- >GetNamespace(_bstr_t( " MAPI"))- >PickFolder() MessageBox( " Could not find default contacts folder.", PFolder=pApp- >GetNamespace(_bstr_t( " MAPI"))- > If (m_Option.GetCheck()) //default outlook contacts folder MessageBox( " Unable to instantiate Outlook.", Hr=pApp.CreateInstance( _uuidof(Application))
0 Comments
Leave a Reply. |