Create folder (contact or appointment)

T

tonyl

Hi,

My program access outlook's data by extended MAPI in VC++. just create
a new folder by calling CreateFolder from parent folder and call savechanges(0).
I have successfully created folders under outlook. However, I notice
that those folders that my program created will be gone (disappeared) in
some situation. After my investigation, I found the following scenario:

scenario A
========
1. close outlook
2. my program create folder under contact folder in one of the msgstore.
3. list all folders in that msgstore through my program, my folders exist.
4. close my application.
5. open outlook. I found that the folders are gone!!!

scenario B
========
1. close outlook
2. my program create folder under contact folder in one of the msgstore.
3. list all folders in that msgstore through my program, my folders exist.
4. open outlook. I found that the folders still exist.

scenario C
========
1. outlook is still running
2. my program create folder under contact folder in one of the msgstore.
3. list all folders in that msgstore through my program, my folders exist.
4. I found that outlook shows those new folders.

How can i create folders not depending on whether outlook is running or not?

Regards,
Ton
 
D

Dmitry Streblechenko

Was that a PST store? My bet is that your app terminated due to an error or
you did not release all the interfaces correctly so that the store provider
could flush the changes to the hard drive.
Extended MAPI questions are better answered in the *.programmer.messaging
newsgroup.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top