We just released a new endpoint to the ReportingCloud Web API:

https://api.reporting.cloud/v1/document/findandreplace

This new endpoint can be used to find any text in any text part of a document including the main text, headers and footers and text frames. The endpoint POST method accepts an array of string arrays with pair values to find and replace strings in a template.

The following code, that uses the ReportingCloud .NET wrapper, finds and replaces the string Invoice with ReplacedText and Invoice2 with ReplacedText2 in the complete document.

Loading...

For mail merge purposes, usually merge fields are used and those templates are merged using the endpoint document/merge. But in several scenarios or templates from legacy applications, simple find and replace processes are very useful.

Start today with ReportingCloud and sign up for a free trial account.

Happy coding!