Managing Outlook MAPI Notes in PST Files

Add Outlook MAPI Notes to PST Files

Create a New PST File and Add Subfolders shows how to create a new PST file and add a subfolder to it. With Aspose.Email you can also create MAPI notes and store them in a PST file. The code sample below creates three MAPI notes of different characteristics, adds them to a PST file within a designated folder, and then safely closes the file.

  1. MapiNote objects are created setting the subject, body, color, and height and width, if necessary.
  2. A new PST file is created using PersonalStorage.create specifying the UNICODE format.
  3. Within the PST file, a predefined folder named “Tasks” is created to store the notes.
  4. Each of the MAPI notes (note1, note2, and note3) is added to the notesFolder using the add_mapi_message_item method. This process integrates the notes into the PST structure for storage.