SearchAndReplace
function SearchAndReplace(
oProperties: object = null,
oProperties.searchString: string = null,
oProperties.replaceString: string = null,
oProperties.matchCase: string = true,
): void
Description
Finds and replaces the text.
Parameters
- oProperties
object
null The properties to find and replace.
- oProperties.searchString
string
null Search string.
- oProperties.replaceString
string
null Replacement string.
- oProperties.matchCase
string
true Case sensitive or not.
Returns
void
Try It
var oDocument = Api.GetDocument();
var oParagraph = oDocument.GetElement(0);
oParagraph.AddText("This is the first sample text. The serial number of this sample text was replaced here.");
oDocument.SearchAndReplace({"searchString": "first", "replaceString": "second"});