TextDocument.ReplaceText(String, String, Int32) Method

Definition

Microsoft Internal Use Only. This API has been deprecated in VS 2022 and above. Please refer the breaking API changes in VS 2022 for guidance on how to migrate API usage via modern find and repalce APIs.

bool ReplaceText(std::wstring const & FindText, std::wstring const & ReplaceText, int vsFindOptionsValue = 0);
[System.Runtime.InteropServices.DispId(144)]
[System.Runtime.InteropServices.TypeLibFunc(64)]
public bool ReplaceText (string FindText, string ReplaceText, int vsFindOptionsValue = 0);
[System.Runtime.InteropServices.DispId(144)]
public bool ReplaceText (string FindText, string ReplaceText, int vsFindOptionsValue = 0);
[<System.Runtime.InteropServices.DispId(144)>]
[<System.Runtime.InteropServices.TypeLibFunc(64)>]
abstract member ReplaceText : string * string * int -> bool
[<System.Runtime.InteropServices.DispId(144)>]
abstract member ReplaceText : string * string * int -> bool
Public Function ReplaceText (FindText As String, ReplaceText As String, Optional vsFindOptionsValue As Integer = 0) As Boolean

Parameters

FindText
String

The text to find.

ReplaceText
String

The text with which to replace the found text.

vsFindOptionsValue
Int32

The find options.

Returns

A Boolean value.

Attributes

Applies to