Работа с заметками Outlook
Contents
[
Hide
]
Создание, сохранение и чтение заметок Outlook
Aspose.Email предоставляет возможность создавать заметки Outlook и сохранять их на диск в формате MSG. Класс MapiNote предоставляет свойства и методы для установки необходимой информации для заметки. В этой статье показано, как создать, сохранить и прочитать MapiNote с диска.
Создание и сохранение заметки Outlook
Для создания и сохранения заметки на диск можно использовать следующие шаги.
- Создать объект класса MapiNote.
- Установить различные свойства по желаемому значению.
- Сохранить заметку на диск в виде файла MSG.
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-for-Java MapiNote note3 = new MapiNote(); note3.setSubject("Blue color note"); note3.setBody("This is a blue color note"); note3.setColor(NoteColor.Blue); note3.setHeight(500); note3.setWidth(500); note3.save(dataDir + "MapiNote_out.msg", NoteSaveFormat.Msg);
Чтение MapiNote
Объект класса MapiNote используется для приведения объекта MapiMessage , который загружает заметку с диска в формате MSG.
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-for-Java | |
MapiMessage note = MapiMessage.fromFile(dataDir + "MapiNote_out.msg"); | |
MapiNote note2 = (MapiNote) note.toMapiMessageItem(); |