S
sshock
I need to know how to get the top-level folder for the store that I
just opened/created with AddStore. My code looks like this right now:
.... (create olApp object) ...
CNameSpace olNs(olApp.GetNamespace("MAPI"));
olNs.AddStore(COleVariant(CString("C:\\plhtest.pst")));
CFolders folders = olNs.get_Folders();
CMAPIFolder folder = folders.GetLast();
.... (do stuff with folder) ...
olNs.RemoveStore(folder);
Is that the correct way to get the folder? I read somewhere that you
aren't guaranteed that the last folder is the right one for the store
you just added, but if not, what is the right way? The AddStore
function doesn't have a return value!
Thanks,
Phillip Hellewell
just opened/created with AddStore. My code looks like this right now:
.... (create olApp object) ...
CNameSpace olNs(olApp.GetNamespace("MAPI"));
olNs.AddStore(COleVariant(CString("C:\\plhtest.pst")));
CFolders folders = olNs.get_Folders();
CMAPIFolder folder = folders.GetLast();
.... (do stuff with folder) ...
olNs.RemoveStore(folder);
Is that the correct way to get the folder? I read somewhere that you
aren't guaranteed that the last folder is the right one for the store
you just added, but if not, what is the right way? The AddStore
function doesn't have a return value!
Thanks,
Phillip Hellewell