How to create and access (add/delete mails) .PST file at runtime?

K

ksskumar

Hi,

I need to store selected mails into some different .pst file at
runtime. Also want to access those mails in .pst at runtime. I can
import and export mails into .MSG file. But it is hard to maintain
mails as .msg files.

My queries are,

1. How to create/open .PST file at runtime ?
2. How to add/delete (import/export) mails (any format like .MSG,
..EML, etc.,) into .PST at runtime ?

Is there any way to handle this kind of situation thru Outlook object
model or CDO or Extended MAPI or Redemption or any other way?

Thanks in advance

with best regards,
Kumar
 
D

Dmitry Streblechenko \(MVP\)

1. Use Namespace.AddStore/RemoveStore
2. To save in the MSG format, call
MailItem.SaveAs "path" olMsg
EML files are not directly supported by Outlook; you'd have to either
programmatically create EML files from the message properties using Extended
MAPI or CDO 1.21 (OOM is not really up to the task) or <plug> you can use
Redemption (url in my sig.) - see SafeMailItem.SaveAs ..., olRFC822 and
SafeMailItem.Import ..., olRFC822 </plug>

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

kumar kss

Hi Dmitry,

Thanks a lot for your suggestion. I tried also. But, regarding your
ans, I have some doubts,

1. I dont want to show my custom (personal folder) in outlook inbox. Is
there any way to hide personal folder thru program?

2. How to create subfolders in personal folder thru program?

3. How I move mails from outlook inbox to custom (personal folder)
folder thru program?

4. All the things are possible thru Redemption, could you pls. give me
some sample codes in VB/VB.NET/C#. (I saw the Redemption site also. But
I am not getting code sample for my requirements)

5. Is there any details document like manual is available for
Redemption?

Thanks in advance,

with best regards,
Kumar

1. Use Namespace.AddStore/RemoveStore
2. To save in the MSG format, call
MailItem.SaveAs "path" olMsg
EML files are not directly supported by Outlook; you'd have to either
programmatically create EML files from the message properties using
Extended
MAPI or CDO 1.21 (OOM is not really up to the task) or <plug> you can
use
Redemption (url in my sig.) - see SafeMailItem.SaveAs ..., olRFC822 and
SafeMailItem.Import ..., olRFC822 </plug>

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