var doc = new Aspose.Words.Document(path);
int i = doc.Range.Replace("[Customers].[Name]", "Aspose", true, true);
The above code does not replace the text. When I inspect the document xml, the text [Customers].[Name] is split over more elements. Is that the problem?
Hi Henrik,
Thanks for your inquiry. Could you please attach your input Word document you’re getting problem with here for testing? I will investigate the issue on my side and provide you more information.
Best Regards,
I Have Attached the document.
Thanks
Henrik
The search text in the attached document i slightly different: [Customer].[Name], but same result.
Thanks
Hi
Henrik,
Thanks for your inquiry. Please use the following correction that worked for me:
Document doc = new Document(@"c:\temp\Invoice.docx");
int i = doc.Range.Replace("[Customer].[Name]",
“Aspose”, true,
false);
Best Regards,