We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Replace the word using aspose.word

I am working on a requirement where I have to find the text and just replace it in PDF.

for eg.


Re: Fee Dispute No. [Case Number], [Case Title]

Dear $RespondentName.

I have to find the “$date” and replace it with current date.
I have tried
doc.Range.Replace("$date",“Todays date”,false,true);
but it is not replacing the string.

I have attached the doc also.

Please help

Hi Uttam,

Thanks for your inquiry and sorry for the delayed response. You can work around this problem by using any of the following ways:

  1. doc.Range.Replace("$date",
    “Todays date”, false, false);
  2. doc.Range.Replace(new
    “Todays date”);

I hope, this helps.

Best regards,