Share via


TextRange.End Property

Publisher Developer Reference

Sets or returns a Long that represents the ending character position of a selection or text range. Read/write.

Syntax

expression.End

expression   A variable that represents an TextRange object.

Return Value
Long

Example

This example starts the selection on the fiftieth character of the current text box shape and ends on the one hundred fiftieth character, then makes the text bold.

Visual Basic for Applications
  Sub test2()
    With Selection.TextRange
        .Start = 50
        .End = 150
        .Font.Bold = msoTrue
    End With
End Sub

See Also