Group:  Microsoft Outlook ยป microsoft.public.outlook.program_addins
Thread: Create folder (contact or appointment)

Geek News

Create folder (contact or appointment)
tonyl <tonyl[ at ]outblaze.com> 2/8/2007 7:09:57 AM
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,
Tony

Re: Create folder (contact or appointment)
"Dmitry Streblechenko" <dmitry[ at ]dimastr.com> 2/8/2007 4:55:21 PM
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

"tonyl" <tonyl[ at ]outblaze.com> wrote in message
news:9d0a0296126058c919aa54c6624c[ at ]news.microsoft.com...
[Quoted Text]
> 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,
> Tony
>
>


Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net