scripting:api:text-document:replace-text

ReplaceText

Method of ITextDocument

Replace text in specific range

var ptEnd = TextDocument.ReplaceText(pRange, strChars, nAction);
ptEnd = TextDocument.ReplaceText pRange, strChars, nAction
CComPtr<IPosition> ptEnd;
HRESULT hr = TextDocument.ReplaceText(pRange, strChars, nAction, &tEnd);