Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
ID
Top
Expand Minimize

AtEndOfDocument Property (General Extensibility)

Visual Studio .NET 2003

Returns True if the object is at the end of the document.

[Visual Basic .NET]
Public ReadOnly Property AtEndOfDocument() As Boolean
[Visual Basic 6]
Property Get AtEndOfDocument() As Boolean
[C++]
HRESULT __stdcall get_AtEndOfDocument(
   /* [out, retval] */ VARIANT_BOOL* retVal
);
[C#]
bool AtEndOfDocument {get;}
[JScript .NET]
public function get AtEndOfDocument() : Boolean

Return Value

True if you are at the end of the document; False if otherwise.

Example

Sub AtEndOfDocumentExample()
   Dim objTextDoc As TextDocument
   Dim objTP As TextPoint, iCtr As Integer
   Dim msg As String

   ' Create a new text file.
   DTE.ItemOperations.NewFile("General\Text File")

   ' Get a handle to the new document and create an EditPoint.
   objTextDoc = DTE.ActiveDocument.Object("TextDocument")
   objTP = objTextDoc.StartPoint.CreateEditPoint

   ' Insert ten lines of text.
   For iCtr = 1 To 10
      objTP.Insert("This is a test." & Chr(13))
   Next iCtr

   ' Capitalize the third word of the second line
   objTP.StartOfDocument()
   msg = "AbsoluteCharOffset value: " & objTP.AbsoluteCharOffset & vbCr
   msg = msg & "AtEndOfDocument value: " & objTP.AtEndOfDocument & vbCr
   msg = msg & "AtEndOfLine value: " & objTP.AtEndOfLine & vbCr
   msg = msg & "AtStartOfDocument value: " & objTP.AtStartOfDocument & vbCr
   msg = msg & "AtStartOfLine value: " & objTP.AtStartOfLine & vbCr
   MsgBox(msg)
End Sub

See Also

Applies To: EditPoint Object | TextPoint Object | VirtualPoint Object

Show:
© 2015 Microsoft