Created
September 19, 2019 06:52
-
-
Save GroupDocsGists/df88aa892e12c5afe202171bf9da546b to your computer and use it in GitHub Desktop.
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
string documentPath = @"C:\sample.docx"; | |
using (Editor editor = new Editor(documentPath)) | |
{ | |
// Obtain editable document from original DOCX document | |
EditableDocument editableDocument = editor.Edit(); | |
string htmlContent = editableDocument.GetEmbeddedHtml(); | |
// Pass htmlContent to WYSIWYG editor and edit there... | |
// Save edited EditableDocument object to some WordProcessing format - DOC for example | |
WordProcessingSaveOptions saveOptions = new WordProcessingSaveOptions(Formats.WordProcessingFormats.Docx); | |
editor.Save(editableDocument, @"C:\output\edited.docx", saveOptions); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment