Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
aspose-com-gists / extract-contacts.py
Last active January 7, 2025 14:41
Parse Outlook PST Files in Python | Extract Messages and Contacts from PST
from aspose.email.storage.pst import PersonalStorage, StandardIpmFolder
from aspose.email.mapi import ContactSaveFormat
# Load PST file
pst = PersonalStorage.from_file("SampleContacts_out.pst")
# Select contacts folder
folderInfo = pst.get_predefined_folder(StandardIpmFolder.CONTACTS)
# Get contacts