Export (0) Print
Expand All
Cut
Run
Expand Minimize

CreateEditPoint Method (TextDocument Object)

Visual Studio .NET 2003

Creates an EditPoint object at the specified location and returns it. The default location is the beginning of the document.

[Visual Basic .NET]
Public Function CreateEditPoint( _
   Optional ByVal TextPoint As TextPoint = Nothing _
) As EditPoint
[Visual Basic 6]
Function CreateEditPoint( _
   Optional ByVal TextPoint As TextPoint = Nothing _
) As EditPoint
[C++]
HRESULT __stdcall CreateEditPoint(
   TextPoint* TextPoint,
   /* [out, retval] */ EditPoint** retVal
);
[C#]
EditPoint CreateEditPoint(
   TextPoint TextPoint
);
[JScript .NET]
public function CreateEditPoint(
   TextPoint : TextPoint
) : EditPoint

Parameters

TextPoint
Optional. A TextPoint Object object to copy. If a value is supplied to TextPoint, then the new point will be at the same Line and LineCharOffset as TextPoint.

Return Value

Returns a EditPoint object.

Remarks

Creates and returns a new EditPoint object at the same physical location as the text point. If the object is a virtual point, then the resulting edit point has the same LineCharOffset value as the object.

Example

The following code creates an edit point on an open text document:

Sub CreateEditPointExample()
   Dim objTD As TextDocument
   Dim objEP As EditPoint

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

See Also

Applies To:TextDocument Object

Show:
© 2015 Microsoft