Share via


EditPoint.Insert(String) Method

Definition

Inserts the given string at the edit point's current position in the buffer.

public:
 void Insert(System::String ^ Text);
public:
 void Insert(Platform::String ^ Text);
void Insert(std::wstring const & Text);
[System.Runtime.InteropServices.DispId(132)]
public void Insert (string Text);
[<System.Runtime.InteropServices.DispId(132)>]
abstract member Insert : string -> unit
Public Sub Insert (Text As String)

Parameters

Text
String

Required. The text to insert into the text buffer. Must be a Unicode string.

Attributes

Examples

Sub InsertExample()  
  ' Before running this example, open a text document.  
  Dim objTD As TextDocument  
  Dim objEP As EditPoint  

  objTD = DTE.ActiveDocument.Object("TextDocument")  
  objEP = objTD.StartPoint.CreateEditPoint  
  objEP.Insert("Test")  
End Sub  

Remarks

The edit point moves past the insertion point.

Applies to