doc.Range.Replace does not work

Hello

Why does the following statement not work?

doc.Range.Replace("%Replacement%","Hello",true,true);

Its because of the Percentage-Sign… but how to escape correctly?

Thx, Greetings from Switzerland

Leo

This message was posted using Page2Forum from Replace Method - Aspose.Words for .NET and Java

Hi

Thanks for your inquiry. Please try using the following code:

doc.Range.Replace("%Replacement%", "Hello", true, false);

Hope this helps.
Best regards.