Free Support Forum - aspose.com

Parent node of Run node returns null after replacing text of Run node using C#

Hi

We have found an issue with the Range.Replace method on a Run. It is blanking out the text rather than replacing and the ParentNode becomes null. This worked on the now deprecated Replace( Regex, iReplacingCallback, bool) version of the method.

The attached project demonstrates the issue. The same issue is also present when not using Replace with a callback (see commented out code).

Thanks
AsposeReplaceOnRunNode.zip (19.3 KB)

@LNGLEEVFDEV

Could you please share some more detail about your use case in which you need to call SplitElements method? Please also share complete detail of your requirement. Perhaps, there is some other way to achieve your requirement. We will then provide you more information about your query.

@tahir.manzoor
We have our own text ‘tags’ that are placed in the Word doc to perform certain operations. In this case we are looking for the start and end tag for a loop function whereby the contents in between the start and end tags are duplicated a number of times. The SplitElements method is to ensure that the tags are in their own runs so that they can be manipulated separately from any other text.

@LNGLEEVFDEV

We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-20007 . You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

@tahir.manzoor
Hi
That’s good news.
Are you able to provide any rough indication of how long it will take to resolve and release us with a fix. This has a critical impact on our business.

Regards
Nick

@LNGLEEVFDEV

We try our best to deal with every customer request in a timely fashion, we unfortunately cannot guarantee a delivery date to every customer issue. We work on issues on a first come, first served basis. We feel this is the fairest and most appropriate way to satisfy the needs of the majority of our customers.

Currently, your issue is pending for analysis and is in the queue. Once we complete the analysis of your issue, we will then be able to provide you an estimate.