Managing Tasks, Journals, and Notes in PST Files
Add MAPI Task to PST
The Creating and Managing PST Files article shows how to create a PST file and add a subfolder to it. With Aspose.Email you can add MapiTask to the Tasks subfolder of a PST file that you have created or loaded. Below are the steps to add MapiTask to a PST:
- Create a MapiTask object.
- Set the MapiTask properties using constructor and different methods.
- Create a PST using the PersonalStorage.Create() method.
- Create a pre-defined folder (Tasks) at the root of the PST file by accessing the Root folder and then calling the AddMapiMessageItem() method.
The following code snippet shows you how to create a MapiTask and then add it to the tasks folder of a newly created PST file.
Add MAPI Journal to PST
Aspose.Email also allows you to add MapiJournal to the Journal subfolder of a PST file that you have created or loaded. Below are the steps to add MapiJournal to a PST:
- Create a MapiJournal object
- Set the MapiJournal properties using a constructor and methods.
- Create a PST using the PersonalStorage.Create() method.
- Create a pre-defined folder (Journals) at the root of the PST file by accessing the root folder and then calling the AddMapiMessageItem() method.
The following code snippet shows you how to create a MapiJournal and then add it to the journal folder of a newly created PST file.
Add Attachments to MAPI Journal
The following code snippet shows you how to add attachments to MapiJournal.
Add MAPI Note to PST
With Aspose.Email you can add a MapiNote to the Notes subfolder of the created or loaded PST file. To add a MapiNote to a PST:
- Create a template MapiNote using Microsoft Outlook and save it as an MSG file.
- Load the saved MSG note into a MapiMessage object.
- Create a MapiNote object and load the template MSG note.
- Set the MapiNote properties.
- Create a PST using the PersonalStorage.Create() method.
- Create a pre-defined folder (Notes) at the root of the PST file by accessing the root folder and then calling the AddMapiMessageItem() method.
The following code snippet shows you how to create a MapiNote and then add it to the notes folder of a newly created PST file.