Selection.Information property (Word)

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


expression. Information( _Type_ )

expression Required. A variable that represents a Selection object.


Name Required/Optional Data type Description
Type Required WdInformation The information type.


This example displays the current page number and the total number of pages in the active document.

MsgBox "The selection is on page " & _ 
 Selection.Information(wdActiveEndPageNumber) & " of page " _ 
 & Selection.Information(wdNumberOfPagesInDocument)

If the selection is in a table, this example selects the table.

If Selection.Information(wdWithInTable) Then _ 

This example displays a message that indicates the current section number.

Selection.Collapse Direction:=wdCollapseStart 
MsgBox "The insertion point is in section " & _ 

See also

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.