Found IT !!
Ok after some messing around and a good night's sleep I finaly found out how to create new folders in the Personal Folders section of Outlook.
Hope this helps out other C++ developers out there cuz there aint much info on the net!
I found the IPF folder type thing on the msdn web site (god that site sucks, never a simple or clear example on there!)
http://support.microsoft.com/default.aspx?id=314192
----------
CComPtr <Outlook::_NameSpace> olNs;
CComQIPtr <Outlook::_Folders> spMainFolderList;
CComQIPtr <Outlook::_Folders> spPersonalFolderList;
CComQIPtr <Outlook::MAPIFolder> spPersonalFolder;
CComQIPtr <Outlook::MAPIFolder> spNewFolder;
//Folder type can be any of the following:
// STRFOLDERTYPE NAME
//----------------------------------
// MailItems IPF.Note
// ContactItems IPF.Contact
// AppointmentItems IPF.Appointment
// NoteItems IPF.StickyNote
// TaskItems IPF.Task
// JournalItems IPF.Journal
CComVariant varFolderType("IPF.Note");
CComBSTR bstr_temp("TestFolder");
//Start a MAPI Session
m_spOutlookApp->get_Session(&olNs);
if(olNs == NULL)
return -1;
//Get the folder list of the current session
olNs->get_Folders(&spMainFolderList);
//Get the first folder (this should be the Personal Folders)
spMainFolderList->GetFirst(&spPersonalFolder);
//Get the folder list of the Personal Folders folder
spPersonalFolder->get_Folders(&spPersonalFolderList);
//Add to the personal folder list.
spPersonalFolderList->Add(bstr_temp, varFolderType , &spNewFolder);