We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Find and delete all content based on nested condition

How can I delete the content of a word document based on the condition?
For example this is my condition :

{%if age==”30”%}
{%if gender==”male”%}
Adult - male
{%endif%}
{%if gender==”female”%}
Adult - female
{%endif%}
{%endif%}

@johnthemc,

Please compress the following resources into ZIP format and attach the .zip file here for testing:

  • A simplified source Word document that you want to remove content from
  • Your expected DOCX file showing the desired output. You can create this output file manually by using MS Word.

As soon as you get these pieces of information ready, we will then start further investigation into your particular scenario and provide you code to achieve the same expected output by using Aspose.Words.

https://www.filemail.com/d/snyjkahekcwtvoj The raw unprocessed file is saved as before-proccesing.docx and the output I want is saved as result-that-i-wanted.docx.
Thanks.

@johnthemc,

We have logged your requirement in our issue tracking system. Your ticket number is WORDSNET-22762. We will further look into the details of this requirement and will keep you updated here on the status of the linked ticket.