Table of contents
TOC
折叠目录
展开目录

Shape.HasTable 属性 (PowerPoint)Shape.HasTable Property (PowerPoint)

office 365 dev account|上次更新日期: 2018/3/13
|
2 参与人员

返回指定的形状是否为表。只读。Returns whether the specified shape is a table. Read-only.

语法Syntax

表达式HasTableexpression. HasTable

表达式_一个表示一个Shape对象的变量。_expression A variable that represents a Shape object.

返回值Return Value

MsoTriStateMsoTriState

注解Remarks

HasTable属性的值可以是其中一个MsoTriState常量。The value of the HasTable property can be one of these MsoTriState constants.

常量Constant说明Description
msoFalsemsoFalse指定的形状不是表。The specified shape is not a table.
属性值为 msoTruemsoTrue指定的形状是表。The specified shape is a table.

示例Example

以下示例检查当前选定的形状是否为表格。如果是表格,此代码将第一列的宽度设置为 1 英寸(72 磅)。This example checks the currently selected shape to see if it is a table. If it is, the code sets the width of column one to one inch (72 points).

With ActiveWindow.Selection.ShapeRange

    If .HasTable = msoTrue Then

       .Table.Columns(1).Width = 72

    End If

End With

另请参阅See also

概念Concepts

Shape 对象Shape Object

© 2018 Microsoft