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

Shape.Select 方法 (PowerPoint)Shape.Select Method (PowerPoint)

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

选择指定的对象。Selects the specified object.

语法Syntax

表达式选择替换expression. Select( Replace )

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

参数Parameters

名称Name必需/可选Required/Optional数据类型Data Type说明Description
ReplaceReplaceOptionalOptionalMsoTriStateMsoTriState指定该选择是否替换之前所做的任何一项选择。Specifies whether the selection replaces any previous selection.

注解Remarks

如果做出不适用于当前视图的选择,此代码将失败。例如,可以在幻灯片浏览视图中而不能在幻灯片视图中选择幻灯片。If you try to make a selection that isn't appropriate for the view, your code will fail. For example, you can select a slide in slide sorter view but not in slide view.

替换_参数值可以是其中一个MsoTriState常量。The _Replace parameter value can be one of these MsoTriState constants.

常量Constant说明Description
msoFalsemsoFalse将该选择添加到前一项选择中。The selection is added to the previous selection.
属性值为 msoTruemsoTrue默认值。该选择替换之前所做的任何一项选择。The default. The selection replaces any previous selection.

示例Example

本示例选择活动演示文稿第一张幻灯片第一个形状。This example selects shape one on slide one in the active presentation.

ActivePresentation.Slides(1).Shapes(1).Select

另请参阅See also

概念Concepts

Shape 对象Shape Object

© 2018 Microsoft