Click here to Skip to main content
15,797,923 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Greetings To every one,

Can any body know how to add a pst file to a data file .

actually i am Developing Pst Parser in which i want to compresses pst by filtering methods in mail items

i can add pst file to data file but i cant find folders Like In box,Outbox etc...

Here is my code to add a pst file to data File
Dim objOL As Outlook.Application
Dim objNS As Outlook.NameSpace
Dim objFolder As Outlook.MAPIFolder
Dim strDisplayName As String
Dim dmppstpath As String
Dim ptFileName As String
ptFileName = "Archive.Pst"
'dmppstpath = pstDirectory + "" + pstFileName
strDisplayName = "PersonalFolder"
objOL = CreateObject("Outlook.Application")
objNS = objOL.GetNamespace("MAPI")
Dim Inbox As String = "Inbox"
objFolder = objNS.Folders.GetLast
objFolder.Name = strDisplayName

please help me to add a complete pst contains all folders in it.

Thanks in advance.
Updated 10-May-10 13:28pm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900