Hi,
Is it possible to extract the HTML content from a word document for a particular page / page range?
If possible, could you please share the sample code. I did search, but could not find. Thanks in advance.
Regards,
Raghu
Hi,
Hi Raghu,
Document doc = new Document(docName);
// Create and attach collector to the document before page layout is built.
LayoutCollector layoutCollector = new LayoutCollector(doc);
// This will build layout model and collect necessary information.
doc.UpdatePageLayout();
// Split nodes in the document into separate pages.
DocumentPageSplitter splitter = new DocumentPageSplitter(layoutCollector);
Document newDoc = splitter.GetDocumentOfPageRange(3, 5);
newDoc.Save(MyDir + "Out.docx");