Export (0) Print
Expand All
Cut
Run
Expand Minimize

Insert Method

Visual Studio .NET 2003

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

[Visual Basic .NET]
Public Sub Insert( _
   ByVal Text As String _
) 
[Visual Basic 6]
Sub Insert( _
   ByVal Text As String _
) 
[C++]
HRESULT __stdcall Insert(
   BSTR Text
);
[C#]
public void Insert(
   string Text
);
[JScript .NET]
public function Insert(
   Text : String
)

Parameters

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

Remarks

The edit point moves past the insertion point.

Example

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

See Also

Applies To: EditPoint Object | EditPoint Example 1

Show:
© 2014 Microsoft