Работа с заметками Outlook
Contents
[
Hide
]
Создание, сохранение и чтение заметок
Aspose.Email предоставляет возможность создавать заметки Outlook и сохранять их на диск в формате MSG. Класс MapiNote предоставляет свойства и методы для установки информации о задаче. В этой статье показано, как создать, сохранить и прочитать MapiNote с диска.
Создание и сохранение заметки Outlook
Для создания и сохранения заметки на диск можно использовать следующие шаги:
- Создайте объект класса MapiNote.
- Установите различные свойства.
- Сохраните заметку на диск как файл MSG.
Следующий фрагмент кода показывает, как создать и сохранить заметку Outlook.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
Чтение MapiNote
Объект класса MapiNote используется для приведения объекта MapiMessage, который загружает заметку с диска в формате MSG. Следующий фрагмент кода показывает, как прочитать MapiNote.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |