Working with Outlook Notes

Creating, Saving and Reading Notes

Aspose.Email provides the facility to create Outlook notes and save them to disc in MSG format. The MapiNote class provides properties and methods for setting task information. This articles shows how to create, save and read a MapiNote from disc.

Creating and Saving an Outlook Note

The following steps can be used to create and save a note to disc:

  1. Instantiate an object of the MapiNote class.
  2. Set various properties.
  3. Save the note to disc as an MSG file.

The following code snippet shows you how to creating and saving an outlook Note.

For complete examples and data files, please go to https://github.com/aspose-email/aspose-email-python-dotnet
note3 = MapiNote()
note3.subject = "Blue color note"
note3.body = "This is a blue color note";
note3.color = NoteColor.YELLOW
note3.height = 500
note3.width = 500
note3.save(dataDir + "CreateAndSaveOutlookNote_out.msg", NoteSaveFormat.MSG)

Reading a MapiNote

The MapiNote class object is used to cast the MapiMessage object that loads a note from disc in MSG format. The following code snippet shows you how to read a MapiNote.

For complete examples and data files, please go to https://github.com/aspose-email/aspose-email-python-dotnet
note = MapiMessage.from_file(dataDir + "CreateAndSaveOutlookNote_out.msg")
note2 = note.to_mapi_message_item()