Skip to content

ROM-Knowledgeware/PSTFileFormat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PSTFileFormat is an open source library written in C# designed to read and write to Outlook PST files.

Usage Examples:

List all folders in a PST file:

public void ListAllFolders(PSTFile file)
{
    tvFolders.Nodes.Clear();
    PSTFolder rootFolder = file.TopOfPersonalFolders;
    TreeNode rootNode = new TreeNode(rootFolder.DisplayName);
    rootNode.Name = rootFolder.NodeID.Value.ToString();
    tvFolders.Nodes.Add(rootNode);
    AddSubFolders(rootNode, rootFolder);
}

public void AddSubFolders(TreeNode node, PSTFolder folder)
{ 
    List<PSTFolder> childFolders = folder.GetChildFolders();
    foreach(PSTFolder childFolder in childFolders)
    {
        TreeNode childNode = new TreeNode(childFolder.DisplayName + " (" + childFolder.ItemType.ToString() + ")" );
        childNode.Name = childFolder.NodeID.Value.ToString();
        node.Nodes.Add(childNode);
        AddSubFolders(childNode, childFolder);
    }
}

Technical References:

  1. https://msdn.microsoft.com/en-us/library/ff385210(v=office.12).aspx

  2. https://blogs.msdn.microsoft.com/openspecification/2010/11/30/ms-pst-how-to-navigate-the-node-btree/

  3. https://blogs.msdn.microsoft.com/openspecification/2011/02/11/ms-pst-the-relationship-between-nodes-and-blocks/

License:

PSTFileFormat is licensed under the GNU Lesser Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

About

Read and write to Outlook Personal Folders (.pst) file

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages