Selecting text in a document

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Use the Select method to select an item in a document. The Select method is available from several objects, such as Bookmark, Field, Range, and Table. The following example selects the first table in the active document.

ActiveDocument.Tables(1).Select

The following example selects the first field in the active document.

ActiveDocument.Fields(1).Select

The following example selects the first four paragraphs in the active document. The Range method is used to create a Range object which refers to the first four paragraphs. The Select method is then applied to the Range object.

Set myRange = ActiveDocument.Range( _
    Start:=ActiveDocument.Paragraphs(1).Range.Start, _
    End:=ActiveDocument.Paragraphs(4).Range.End)
myRange.Select

For more information, see Working with the Selection object.