KeyView 24.1

# Microsoft Personal Folders File (PST) Metadata

In addition to the default metadata set, you can extract Messaging Application Programming Interface (MAPI) properties from a PST file. These properties describe elements (subject, sender, recipient, and so on) of Outlook items within the PST file. Since the properties are stored in the PST file itself, they can be retrieved before the contents of the PST are extracted. This enables you to determine whether an Outlook item should be extracted based on a subfile's attributes. MAPI properties are also stored for Outlook attachments that are not mail messages (such as an attached Microsoft Word document or Lotus 1-2-3 file).

## MAPI Properties

Each MAPI property is identified by a property tag, which is a constant that contains the property type and a unique identifier. For example, the property that indicates whether a message has attachments has the following components:

Property | `PR_HASATTACH`
Identifier | `0x0E1B`
Property type | `PT_BOOLEAN (000B`)
Property tag | `0x0E1B000B`

The Microsoft MAPI documentation on the Microsoft Developer Network website lists all available MAPI properties, their tags, and types.

You can retrieve any MAPI property that is of one of the MAPI property types listed below:

`PT_I2` | `PT_DOUBLE` | `PT_STRING8`
`PT_I4` | `PT_FLOAT` | `PT_TSTRING`
`PT_BINARY` | `PT_LONG` | `PT_SYSTIME`
`PT_BOOLEAN` | `PT_SHORT` | `PT_UNICODE`

NOTE: Properties with a `PT_TSTRING` type have the property type recompiled to either a Unicode string (`PT_UNICODE`) or to an ANSI string (`PT_STRING8`) depending on the operating system's character set. To retrieve the Unicode property, pass in the Unicode version of the tag. For example, the property tag for `PR_SUBJECT` is either `0x0037001E` for an ANSI string, or `0x0037001F` for a Unicode string.

## Extract PST-Specific Metadata

In the call to extract subfile metadata, you can pass either the MAPI tag number (such as `0x0070001e`) or one of the constants in the `FilterConstant.MAPIConstant` class (such as `KVPR_SUBJECT`). These constants are a subset of MAPI properties and use a KeyView naming convention. For example, the property `PR_CONVERSATION_TOPIC` is defined as `KVPR_CONVERSATION_TOPIC`. If the property you want to retrieve is not defined in the `FilterConstant.MAPIConstant` class, you must pass the MAPI tag number.

To extract specific MAPI properties from a PST file, use the following method:

    ExtractGetSubFileMetadata(long docContextID, int sIndex, int[] metadataID);

Pass the tag numbers or constants to the method using the `metadataID` argument.

For example, the following code extracts the MAPI properties `PR_SUBJECT` and `PR_ALTERNATE_RECIPIENT`:

    const int PR_ALTERNATE_RECIPIENT = 0x3A010102;

    int[] metadataID = { FilterConstant.MAPIConstant.KVPR_SUBJECT, PR_ALTERNATE_RECIPIENT };

    ExtractSubFileMetadata metadata = objFilter.ExtractGetSubFileMetadata(extContextId, subfileIndex, metadataID);

Copyright 2016-2023 Open Text
Version 24.1 | Last updated December 2023

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: IDOL KeyView 24.1

Topic Title: Microsoft Personal Folders File (PST) Metadata