GroupDocs.Editor for Java API 是编辑 Microsoft Word、Excel、PowerPoint、Open Office 文档和演示文稿的正确选择。 GroupDocs.Editor 是一个独立的 API,适用于需要高性能的服务器端和后端系统。它不依赖于任何软件,如 Microsoft 或 Open Office。
GroupDocs.Editor for Java 为开发人员提供了一种使用几行代码编辑 MSG 文件的简单直接的方法。
Editor
类的实例并加载 MSG 文件EmailEditOptions
类实例Editor.Edit()
方法并获得 HTML 格式的 MSG 文档,该文档可以使用任何所见即所得的编辑器轻松编辑。Editor.Save()
方法并使用 EmailSaveOptions
类保存编辑的 MSG 文件使用 GroupDocs.Editor for Java API 进行基本文档编辑可以通过几个简单的步骤来完成。所有主要平台和操作系统都支持我们的 API。在执行以下代码之前,请确保您的系统上安装了以下先决条件。
// Load the MSG file into Editor
Editor editor = new Editor("source.msg");
// Create and adjust the edit options
EmailEditOptions editOptions = new EmailEditOptions();
// Open input MSG document for edit — obtain an intermediate document, that can be edited
EditableDocument beforeEdit = editor.edit(editOptions);
// Grab MSG document content and associated resources from editable document
string content = beforeEdit.getEmbeddedHtml();
// Send the content to WYSIWYG-editor, edit it there, and send edited content back to the server-side
// This step simulates a such operation
string updatedContent = content.replace("project", "Edited project");
// Grab edited content and resources from WYSIWYG-editor and create a new EditableDocument instance from it
EditableDocument afterEdit = EditableDocument.fromMarkup(updatedContent, null);
// Create a save options
EmailSaveOptions saveOptions = new EmailSaveOptions();
// Save edited MSG document to the file
editor.save(afterEdit, "edited.msg", saveOptions);
立即访问 GroupDocs.Editor 现场演示 网站编辑 MSG。 现场演示有以下好处
无需下载 API
无需编写任何代码
只需上传源文件
获取下载链接以保存文件
您还可以编辑其他文件格式。请参阅下面的完整列表。
(Microsoft Word Binary Format)
(Office 2007+ Word Document)
(Microsoft Word 2007 Marco File)
(Microsoft Word Template File )
(Rich Text Format)
(OpenDocument Text File Format)
(Microsoft Excel Spreadsheet (Legacy))
(Open XML Workbook)
(Macro-enabled Spreadsheet)
(Microsoft PowerPoint 97-2003)
(Open XML presentation Format)
(Macro-enabled Presentation File)
(Open Ebook Format)
(Open eBook File)
(Hyper Text Markup Language)
(Web Page Archive Format)
(Text Document)
(XML File)
(E-Mail Message)
(Email Mailbox File)