Hi there. i am new to aspose and require some help.
Requirement:- I have one DocX file (PFA source.docx) which contains ==START== and ==END== placeholder (just a simple text as per attachment). All i want is extract content between Those two placeholder, get the HTML of that extracted body content and replace content along with ==START== and ==END== to BODY_CONTENT in actual docx file. all other part of docx should be remain same (as per required.docx file).
My idea is use ExtractContentBetweenParagraphs to get content and pass them to new Document(in memory) and save that new doc as HTML.
Questions:-
how to get paragraph number of ==START== and ==END==?
2)how to replace Text of ==START== with BODY_CONTENT without changing format and remove content with ==END==
Hey @awais.hafeez that delete bookmark stuff is also deleting BODY_CONTENT which we have previously set while fetching start paragraph. i have tried with builder.MoveTo(start.getNextSibling()); also but didn’t worked for me.
Thanks for your inquiry. To ensure a timely and accurate response, please attach the following resources here for testing:
Your input Word document
Aspose.Words generated output document showing the undesired behavior
Your expected Word document showing the correct output
Please create a standalone simplified console application (source code without compilation errors) that helps us reproduce your specific problem on our end and attach it here for testing.
As soon as you get these pieces of information ready, we’ll start further investigation into your issues and provide you more information. Thanks for your cooperation.