BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
Hi Gary,
Thank you for contacting Syncfusion support.
If your requirement is to save each and every pages of the Word document as separate HTML file, then kindly keep each and every pages as separate sections in the Word document and iterate each sections from the Word document then save them as separate HTML files using the below code example.
Code example:
//Opens the source document
WordDocument sourceDocument = new WordDocument(@"File location");
int i = 1;
//Iterates the sections
foreach (WSection section in sourceDocument.Sections)
{
//Instatiating the new WordDocument object
WordDocument htmlDocument = new WordDocument();
//Add the current section to the new Word document
htmlDocument.Sections.Add(section.Clone());
//Saves the document.
htmlDocument.Save("DocIOHTML" + i.ToString() + ".html", FormatType.Html);
//Closing WordDocument instance
htmlDocument.Close();
i++;
}
//Closing source document instance
sourceDocument.Close();
Regards,
Sathish
Hi Gary,
Thank you for your update.
The Word document is a flow document in which contents will not be preserved page by page; instead the contents will be preserved sequentially section by section. Each section may extend to various pages based on its contents like table, text, images etc. Word viewer/editor renders the contents of the Word document page by page dynamically when opened for viewing or editing and these page wise rendered information will not be preserved in the document level as per the Word file format specification. Whereas Essential DocIO is a non UI component that provides a full-fledged document object model to manipulate the Word document contents. Hence currently it is not feasible to meet your requirement.
Please let us know in case of any other questions.
Regards,
Divyalakshmi V