全部显示

Information 属性

       

返回有关指定的所选内容或区域的信息。Variant 类型,只读。

expression.Information(Type)

expression   必需。该表达式返回“应用于”列表中的一个对象。

Type  WdInformation,必需。消息类型。

示例

本示例显示当前页码和活动文档的总页数。

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

如果所选内容位于一个表格中,则本示例选定该表格。

If Selection.Information(wdWithInTable) Then _
    Selection.Tables(1).Select

本示例显示一条消息,表明当前的节号。

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