Replace Handler Issue

Hi,

I am currently using Aspose.Words version 14.3.0.0. I am replacing a particular text with another, but I am facing an issue for the same. Can you please help me.

Example:

I have a document A. In this document there are 3 tags: ABC_1, ABC_10, ABC_100. I want to replace these values by another document. ABC_1 value will be replaced by text of document B, ABC_10 value will be replaced by text of document C, and ABC_100 value will be replaced by the text of document D.

But the result I am getting is that for all the tags (ABC_1, ABC_10, ABC_100), the value is being replaced by document B only.

The attached file has the code for replacing being used.

Please help. Hoping for a quick and positive reply.

Hi,

I am currently using Aspose.Words version 14.3.0.0. I am replacing a particular text with another, but I am facing an issue for the same. Can you please help me.

Example:

I have a document A. In this document there are 3 tags: ABC_1, ABC_10, ABC_100. I want to replace these values by another document. ABC_1 value will be replaced by text of document B, ABC_10 value will be replaced by text of document C, and ABC_100 value will be replaced by the text of document D.

But the result I am getting is that for all the tags (ABC_1, ABC_10, ABC_100), the value is being replaced by document B only.

Please help. Hoping for a quick and positive reply.

Hi.

I wanted to add one more details. From the code it seems like the code is doing a matching case with a LIKE condition. We want an exact match, since the range of tags wil go from ABC_1 to ABC_10000. Thus 10000 different tags will be there.

Please help us out, in between a PRODUCTION ISSUE.

Hi,


Thanks for your inquiry. Please upgrade to the latest version of Aspose.Words 14.5.0 from the following link. Also, try executing the attached code and see how it goes on your end. I hope, this helps.
http://www.aspose.com/community/files/51/.net-components/aspose.words-for-.net/default.aspx

Best regards,