Managing Outlook MAPI Tasks in PST Files
Contents
[
Hide
]
Add Outlook MAPI Tasks to PST Files
Create New PST File and Add Subfolders demonstrates how to create a PST file and include subfolders within it. With Aspose.Email you can also add MAPI Tasks to the Tasks subfolder of a PST file that you have created or loaded. The code sample below demonstrates how to create and manage a task using the MapiTask class in an environment that supports manipulating personal storage table (PST) files. It defines a task with specific parameters and then saves this task to a PST file under a predefined “Tasks” folder.
- Create a MapiTask object setting the start date to the current date and the due date to three days from now.
- Set the task properties.
- 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 add_mapi_message_item() method.