Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

TextDocument.ReplaceText(String, String, Int32) Method

Definition

Namespace:
EnvDTE
Assembly:
EnvDTE.dll
Assembly:
Microsoft.VisualStudio.Interop.dll
Package:
Microsoft.VisualStudio.Interop v17.14.40260

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

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