Hi Everyone,
I am wokring on a project that has used an MFC DLL in conjunction with Outlook to send and archive mail. I need to be able to create folders for integration from an older mail system. I have looked online to see if there are examples in C++ (since I have to modify the existing C++ dll to include the funcitonality). I realize it is much simpler using VBA or C#, but I am limited with my choice.
I essentially want to use the MFC type lib for Outlook 14 and use the CMAPIFolder,CFolders create folders in the Inbox.

here is a sample of the code:
//I have included the necessary header files

COleVariant covOptional((long)DISP_E_PARAMNOTFOUND, VT_ERROR);
//start outlook
if (!olApp.CreateDispatch(_T("Outlook.Application"), &e))
::MessageBoxA(0,"","Please start Outlook and try again!!",0);
COleVariant profile((LPTSTR)(LPCTSTR)olApp.get_DefaultProfileName());
//get inbox folder .
CFolders cf_Inbox = curStore.GetDefaultFolder(OutlookFolders:lFolder_Inbox);
if (FileName!=NULL)
if (!createFolderName.IsEmpty())
CComVariant folderType("IPF.Note");
cf_Inbox.Add((LPTSTR)(LPCTSTR)createFolderName,folderType); //<<--- keep getting a member not found error.



I am not sure if I am going about this the correct way. I would appreciate any input.
Thanks in advance