Merge field not replacing fields correctly

We are using a simple merge field to place an INCLUDETEXT merge field (Which will then be addresses by a TextVisitor we have).


However, when the merge field is getting processed, it’s only replacing the Merge, and not processing the IF.

The result of this merge, should leave a INCLUDETEXT in it’s place, which we process separately.

Please see attached sample.

Hi Adam,

Thanks for your inquiry. Please note that Aspose.Words mimics the same behavior as MS Word does. If you perform the same scenario using MS Word, you will get the same output.

In case, you want to replace the INCLUDETEXT with the contents of document used in this field, I suggest you please insert that document into the document using the code example shared here:
http://www.aspose.com/docs/display/wordsnet/How+to++Insert+a+Document+into+another+Document

If you still face problem, please share your expected output document here for our reference. We will then provide you more information about your query along with code.