We’re currently testing to upgrade to the newest version of Aspose.Words (17.11). And we’ve found a bug. We have a GroupShape and inside that GroupShape is text we want to replace. Looping through each section in the document replaces all the patterns with the replacement, except for the text in the groupshape.
theSection.Body.Range.Replace("replace this text", "REPLACED!", new FindReplaceOptions { FindWholeWordsOnly = false, MatchCase = false });
See attachment. Inside is a document ‘Before.docx’ which contains 3 texts (a normal paragraph, a textbox (shape), and a groupshape (containing a shape and a textbox).
The ‘Result.docx’ is after replacement and as you can see the GroupShape text is not replaced.
Replacement bug.zip (25.2 KB)
@hro_jordy1,
While using the latest version of Aspose.Words i.e. 17.11, we managed to reproduce this issue on our end. We have logged this issue in our bug tracking system. The ID of this issue is WORDSNET-16189. Your request has also been linked to the appropriate issue and you will be notified as soon as it is resolved. Sorry for the inconvenience.
@awais.hafeez, thank you for the notification. Do you have an estimate when the bug fix will be released?
On a side note, it also fails when using the .Replace(Regex, “”, FindReplaceOptions { ReplacingCallback = new…, because the match cannot be found, while it can find the other matches.
@hro_jordy1,
Unfortunately, your issue is not resolved yet. We have asked the ETA of this issue from our product team and will update you as soon as any estimates are available. We apologize for your inconvenience.
@hro_jordy1
,
The issues you have found earlier (filed as WORDSNET-16189) have been fixed in this Aspose.Words for .NET 18.1 update and this Aspose.Words for Java 18.1 update.
Please also check the following articles:
Thanks, I will check if it completely fixes the issue in our documents.
@awais.hafeez,
Thanks, I’ve checked this fix in our documents, and it seems the issue has been fixed (without any other issues emerging).
@hro_jordy1,
It is great that the latest version of Aspose.Words resolves the issue on your end. In case you have any further inquiries or need any help, please let us know.