Click here to Skip to main content
15,887,027 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I need a C++ application to get Outlook contacts (from my local Outlook application)

What I have tried:

Hi,

I found this old example:
https://www.codeproject.com/Articles/3695/Importing-contacts-from-Outlook

But when I try to compile the code in my VS 2017 (once Outlook paths changed to mine) I get some errors in 'msoutl.tlh' file, autogenerated while compilation:
...
\msoutl.tlh(6015): error C3121: cannot change GUID for class 'Folder'
...
error C2556: 'AddressEntryPtr _AppointmentItem::GetOrganizer(void)': overloaded function differs only by return type from '_bstr_t _AppointmentItem::GetOrganizer(void)'
...
error C2371: '_AppointmentItem::GetOrganizer': redefinition; different basic types
Maybe I have something wrong in project configuration...

Any help?

Thanks,
Diego
Posted
Updated 20-Aug-19 23:18pm
v2

Delete all temporary files and "Rebuild All". If that doesnt work: close Visual Studio re-delete and also delete the temp files in the solution folder. (Some databases) Check the timestamp to find them.

It can also be that Microsoft had changed the interface of some functions, so carefully read the documentation of it.
 
Share this answer
 
Comments
Member 14550684 21-Aug-19 5:17am    
Thanks Karsten, i rtied to rebuild, clean and so but no success...
Just if usefull for anyone, I found how to compile the code here:

https://docs.microsoft.com/es-es/office/troubleshoot/office-developer/automate-outlook-2010-using-c-with-mfc


Just add to the import line:

... rename("Folder", "OlkFolder") rename("CopyFile", "OlkCopyFile")` rename("GetOrganizer", "GetOrganizerAE")


to avoid the compilation errors
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900