Parsing and Creating Outlook Tasks

In every day communication via email, one of the key skills is an effective task management. Microsoft Outlook, a popular email client, provides a robust tool for that. You can seamlessly parse and create Outlook tasks, optimizing your workflow and boosting your productivity. In this article, we will explore how to achieve this using a functional tool from the .NET API’s arsenal.

.NET API to Work with Outlook Items

Outlook tasks are a valuable resource for managing your Outlook to-do list, setting deadlines, and tracking your progress. Messages often contain important information that can be converted into tasks to help you stay organized. Our powerful Aspose.Email for .NET library provides a comprehensive set of classes and methods that allow you to work with Outlook data files (PST, OST, and MSG), email messages, and various other email-related operations. One of its key features is the ability to parse and create Outlook tasks from MSG files without addressing the client.

To leverage the power of the API, you can download it from the Aspose website or install it via NuGet.

Install-Package Aspose.Email

Parsing Outlook Tasks from MSG files

This can be a time-saving process, especially when you receive assignments via email. Here’s a sample code snippet that demonstrates how to parse an Outlook task from a MAPI message:

The code performs the following steps:

  1. Loads the message from a file or stream using the MapiMessage class.

  2. Checks if the message is a task and then uses the MapiTask class to access task properties.

If it is a task, you can convert it to a MapiTask object, and access its properties like subject, start date, due date, progress, status and more for further processing.

Creating Outlook Tasks Programmatically

Creating Outlook tasks is equally straightforward with our library. Here’s a code snippet that demonstrates how to create an Outlook task programmatically:

The code performs the following steps:

  1. Creates a new MapiTask object (you can set any desired properties).

  2. Saves the task as an MSG file using the Save method of the MapiTask class (or you can add it to an existing PST).


The knowledge gained from this article will equip you with a power to manage assignments effectively. The MapiTask class provides a convenient way to work with Outlook items, enabling you to automate task creation and streamline your workflow. Whether you want to convert received emails into tasks or generate them programmatically, Aspose.Email simplifies the process.

For further assistance and to dive deeper into the capabilities of the .NET API, we encourage users to explore our comprehensive documentation. If you have questions or seek insights from the community, you can visit our forum, where experts and fellow users are ready to assist. Additionally, to stay updated with the latest developments and tips, be sure to read more informative articles on our blog. Try Aspose.Email today and supercharge your email and task management capabilities.

See Also