Selection Properties (Word)

GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Properties

Name

Description

Active

True if the selection in the specified window or pane is active. Read-only Boolean.

Application

Returns an Application object that represents the Microsoft Word application.

BookmarkID

Returns the number of the bookmark that encloses the beginning of the specified selection. Read-only Long.

Bookmarks

Returns a Bookmarks collection that represents all the bookmarks in a document, range, or selection. Read-only.

Borders

Returns a Borders collection that represents all the borders for the specified object.

Cells

Returns a Cells collection that represents the table cells in a selection. Read-only.

Characters

Returns a Characters collection that represents the characters in a document, range, or selection. Read-only.

ChildShapeRange

Returns a ShapeRange collection representing the child shapes contained within a selection.

Columns

Returns a Columns collection that represents all the table columns in a selection. Read-only.

ColumnSelectMode

True if column selection mode is active. Read/write Boolean.

Comments

Returns a Comments collection that represents all the comments in the specified. Read-only.

Creator

Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.

Document

Returns a Document object associated with the specified selection. Read-only.

Editors

Returns an Editors object that represents all the users authorized to modify a selection within a document.

End

Returns or sets the ending character position of a selection. Read/write Long.

EndnoteOptions

Returns an EndnoteOptions object that represents the endnotes in a selection.

Endnotes

Returns an Endnotes collection that represents all the endnotes conatined within a selection. Read-only.

EnhMetaFileBits

Returns a Variant that represents a picture representation of how a selection or range of text appears.

ExtendMode

True if Extend mode is active. Read/write Boolean.

Fields

Returns a read-only Fields collection that represents all the fields in the selection.

Find

Returns a Find object that contains the criteria for a find operation. Read-only.

FitTextWidth

Returns or sets the width (in the current measurement units) in which Microsoft Word fits the text in the current selection. Read/write Single.

Flags

Returns or sets properties of the selection. Read/write WdSelectionFlags.

Font

Returns or sets a Font object that represents the character formatting of the specified object. Read/write.

FootnoteOptions

Returns FootnoteOptions object that represents the footnotes in a selection.

Footnotes

Returns a Footnotes collection that represents all the footnotes in a range, selection, or document. Read-only.

FormattedText

Returns or sets a Range object that includes the formatted text in the specified range or selection. Read/write.

FormFields

Returns a FormFields collection that represents all the form fields in the selection. Read-only.

Frames

Returns a Frames collection that represents all the frames in a selection. Read-only.

HasChildShapeRange

True if the selection contains child shapes. Read-only Boolean.

HeaderFooter

Returns a HeaderFooter object for the specified selection. Read-only.

HTMLDivisions

Returns an HTMLDivisions object that represents an HTML division in a Web document.

Hyperlinks

Returns a Hyperlinks collection that represents all the hyperlinks in the specified selection. Read-only.

Information

Returns information about the specified selection. Read-only Variant.

InlineShapes

Returns an InlineShapes collection that represents all the InlineShape objects in a selection. Read-only.

IPAtEndOfLine

True if the insertion point is at the end of a line that wraps to the next line. Read-only Boolean.

IsEndOfRowMark

True if the specified selection or range is collapsed and is located at the end-of-row mark in a table. Read-only Boolean.

LanguageDetected

Returns or sets a Boolean that specifies whether Microsoft Word has detected the language of the selected text.

LanguageID

Returns or sets the language for the specified object. Read/write .

LanguageIDFarEast

Returns or sets an East Asian language for the specified object. Read/write WdLanguageID.

LanguageIDOther

Returns or sets the language for the specified object. Read/write WdLanguageID.

NoProofing

True if the spelling and grammar checker ignores the specified text. Returns wdUndefined if the NoProofing property is set to True for only some of the specified text. Read/write Long.

OMaths

Returns an OMaths collection that represents the OMath objects within the current selection. Read-only.

Orientation

Returns or sets the orientation of text in a selection when the Text Direction feature is enabled. Read/write WdTextOrientation.

PageSetup

Returns a PageSetup object that's associated with the specified selection.

ParagraphFormat

Returns or sets a ParagraphFormat object that represents the paragraph settings for the specified selection. Read/write.

Paragraphs

Returns a Paragraphs collection that represents all the paragraphs in the specified selection. Read-only.

Parent

Returns an Object that represents the parent object of the specified Selection object.

PreviousBookmarkID

Returns the number of the last bookmark that starts before or at the same place as the specified selection or range; returns 0 (zero) if there is no corresponding bookmark. Read-only Long.

Range

Returns a Range object that represents the portion of a document that's contained in the specified object.

Rows

Returns a Rows collection that represents all the table rows in a range, selection, or table. Read-only.

Sections

Returns a Sections collection that represents the sections in the specified selection. Read-only.

Sentences

Returns a Sentences collection that represents all the sentences in the selection. Read-only.

Shading

Returns a Shading object that refers to the shading formatting for the specified selection.

ShapeRange

Returns a ShapeRange collection that represents all the Shape objects in the selection. Read-only.

Start

Returns or sets the starting character position of a selection. Read/write Long.

StartIsActive

True if the beginning of the selection is active. Read/write Boolean.

StoryLength

Returns the number of characters in the story that contains the specified selection. Read-only Long.

StoryType

Returns the story type for the specified selection. Read-only WdStoryType.

Style

Returns or sets the style for the specified object. To set this property, specify the local name of the style, an integer, a WdBuiltinStyle constant, or an object that represents the style. For a list of valid constants, consult the Microsoft Visual Basic Object Browser. Read/write Variant.

Tables

Returns a Tables collection that represents all the tables in the specified selection. Read-only.

Text

Returns or sets the text in the specified selection. Read/write String.

TopLevelTables

Returns a Tables collection that represents the tables at the outermost nesting level in the current selection. Read-only.

Type

Returns the selection type. Read-only WdSelectionType.

WordOpenXML

Returns a String that represents the XML contained within the selection in the Microsoft Word Open XML format. Read-only.

Words

Returns a Words collection that represents all the words in a selection. Read-only.

XML

Returns a String that represents the XML text in the specified object. .