File Content Extraction 26.3
Filter SDK C Programming Guide

# Outlook Personal Folders Files

File Content Extraction can extract Outlook items such as messages, appointments, contacts, tasks, notes, and journal entries from a PST file.

By default, an extracted message will include header information (the fields `To`, `From`, `Sent`, and so on) even though this information is stored in the PST container and not in the message. For more information, see Mail Metadata.

NOTE: The Microsoft Outlook Personal Folders (PST) readers are an advanced feature and are sold and licensed separately. To enable these readers, you must obtain an appropriate license key from OpenText. For information about adding a new license key to an existing installation, see Pass License Information to File Content Extraction.

## Choose the Reader to use for PST Files

File Content Extraction provides several ways of processing PST files:

- Indirectly, using the Microsoft Messaging Application Programming Interface (MAPI). MAPI is a Microsoft interface that enables different applications to exchange messages and attachments with each other. MAPI allows File Content Extraction to open a PST file, traverse the folders, and extract items. The `pstsr` reader uses MAPI, but works only on Windows and requires that Microsoft Outlook is installed.
- Directly, without relying on the Microsoft interface to the PST format. Accessing the file directly does not require Microsoft Outlook. The `pstxsr` reader accesses PST files directly and is available on all supported platforms.

The differences between the readers are summarized in the following table.

Feature | Native Reader (pstxsr) | MAPI-based Reader (pstsr)
--- | --- | ---
Platforms supported | The MAPI-based reader is available only on Windows. See the Platform Differences documentation.
Outlook required | No | Yes
MAPI properties supported | Yes. All properties defined in `mapitags.h`. Object properties are not supported.
Password protection supported | Yes | Yes (using `KVCredential` structure)
Compressible encryption supported | Yes | Yes
High encryption supported | No | Yes

To change the reader used to process PST files, change the PST entry (file format number `356`) in the `formats.ini` file. For example, to use `pstxsr`:

    356=pstx

NOTE: You must make sure that the PST that you are extracting is not open in the Outlook client, and that the Outlook process is not running.

NOTE: When extracting subfiles from PST files, information on the distribution list used in an email is extracted to a file called `emailname.dist`. This applies to the MAPI reader (`pstsr`) only.

### System Requirements

MAPI is supported on Windows platforms only and relies on functionality in Outlook. If you want to use the MAPI-based reader, `pstsr`, Microsoft Outlook must be installed on the same machine as your application. Outlook must also be the default email application. File Content Extraction supports the following PST formats and Outlook clients:

- Outlook 97 or later PST files

  NOTE: The Outlook client must be the same version as, or newer than, the version of Outlook that generated the PST file.

- Outlook 2002 or later clients

  NOTE: You must install an edition of Microsoft Outlook (32-bit or 64-bit) that matches the File Content Extraction software. For example, if you use 64-bit File Content Extraction, install 64-bit Outlook.

  If the editions do not match, File Content Extraction returns `Error 32: KVError_PSTAccessFailed` and an error message from Microsoft Office Outlook is displayed: `Either there is a no default mail client or the current mail client cannot fulfill the messaging request. Please run Microsoft Outlook and set it as the default mail client`.

## Extract Messages in MSG Format

A PST file can contain many e-mail messages, each of which can have associated attachments. File Content Extraction considers all of the e-mail message bodies and all of the attachments to be subfiles of the PST container. The Extract API provides information so that you can determine which attachments are associated with which messages (see Understand the Subfile Hierarchy).

E-mail message bodies that you extract from a PST file are normally extracted in the format `KV_Mail_Subfile_Fmt` (format 1634). This file format can be opened in a text editor.

Microsoft uses the MSG format (`MS_Outlook_Fmt`) to represent a single email. While a PST file does not actually contain MSG files, you can configure File Content Extraction to construct an MSG file from the data the PST stores about any particular message. If you have configured File Content Extraction to use the MAPI-based reader (pstsr), MAPI is used to create the MSG file. If you use the native reader (pstxsr) there are some known limitations.

Limitations of extracting messages to MSG format using `pstxsr`:

- It might not be possible to open the created MSG file in Microsoft Outlook.
- Some attachments might be missing, including attached emails.
- Some metadata might be missing, including those from "named" MAPI properties and multi-value properties.

To extract messages in MSG format

- In the C API, set the flag `KVExtractionFlag_SaveAsMSG` in the KVExtractSubFileArg structure when you call fpExtractSubFile().

## MAPI Attachment Methods

The way in which you can access the contents of a PST message attachment is determined by the MAPI attachment method applied to the attachment. For example, if the attachment is an embedded OLE object, it uses the `ATTACH_OLE` attachment method. File Content Extraction can access message attachments that use the following attachment methods:

- `ATTACH_BY_VALUE`
- `ATTACH_EMBEDDED_MSG`
- `ATTACH_OLE`
- `ATTACH_BY_REFERENCE`
- `ATTACH_BY_REF_ONLY`
- `ATTACH_BY_REF_RESOLVE`

Attachments using the `ATTACH_BY_VALUE`, `ATTACH_EMBEDDED_MSG`, or `ATTACH_OLE` attachment methods are extracted automatically when the PST file is extracted. An "attach by reference" method means that the attachment is not in Outlook, but Outlook contains an absolute path to the attachment. Before you can extract these types of attachments, you must retrieve the path to access the attachment.

To extract "attach by reference" attachments

1. Determine whether the attachment uses an `ATTACH_BY_REFERENCE`, `ATTACH_BY_REF_ONLY`, or `ATTACH_BY_REF_RESOLVE` method by retrieving the MAPI property `PR_ATTACH_METHOD`.
2. If the attachment uses one of the "attach by reference" methods, get the fully qualified path to the attachment by retrieving the MAPI properties `PR_ATTACH_LONG_PATHNAME` or `PR_ATTACH_PATHNAME`.
3. You can then either copy the files from their original location to the path where the PST file is extracted, or use the Filter API functions to filter the attachment.

## Detect PST Files While Outlook is Running

If you are running an Outlook client while running the File Extraction API, file format detection might not be able to open the PST file to determine the file’s format because Outlook has the file locked. In this case, you can do one of the following:

- Close Outlook when using the Extraction API.

- Detect PST files by extension only and bypass the format detection module. To enable this option, add the following lines to the `formats.ini` file:

      [container_flags]
      detectPSTbyExtension=1

  NOTE: The `detectPSTbyExtension` option applies only when you are using the MAPI reader (`pstsr`).

  NOTE: If you use this option, you must make sure in your code that valid PST files are passed to File Content Extraction, because format detection is not able to verify the file type and pass the file to the appropriate reader.

Copyright 1997-2026 Open Text
Version 26.3 | Last updated July 2026

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: File Content Extraction 26.3

Topic Title: Outlook Personal Folders Files