在 Jython 中创建并保存 Outlook 便签
Contents
[
Hide
]
Aspose.Email - 创建和保存 Outlook 笔记
要使用 Aspose.Email Java for Jython 创建 Outlook 笔记,只需调用 CreateOutlookNote 模块。下面是示例代码。
Jython 代码
from aspose-email import Settings
from com.aspose.email import MapiNote
from com.aspose.email import NoteColor
from com.aspose.email import NoteSaveFormat
class CreateOutlookNote:
def __init__(self):
dataDir = Settings.dataDir + 'ProgrammingOutlook/WorkingWithOutlookMessageFiles/CreateOutlookNote/'
note = MapiNote()
note.setSubject("Blue color note")
note.setBody("This is a blue color note")
noteColor = NoteColor
note.setColor(noteColor.Blue)
note.setHeight(500)
note.setWidth(500)
noteSaveFormat=NoteSaveFormat
note.save(dataDir + "MapiNote.msg", noteSaveFormat.Msg)
print "Created outlook note successfully."
if __name__ == '__main__':
CreateOutlookNote()下载运行代码
从以下任意提到的社交编码站点下载 创建和保存 Outlook 便笺 (Aspose.Email):