应用于 ActionSettings 对象的 Item 方法。
从指定的 ActionSettings 集合中返回单个动作设置。
expression.Item(Index)
expression 必选。该表达式返回一个 ActionSettings 集合。
Index 必选。PpMouseActivation 类型。MouseClick 或 MouseOver 事件的动作设置。
PpMouseActivation 可以是下列 PpMouseActivation 类型常数之一。 |
ppMouseClick 用户单击形状时的动作设置。 |
ppMouseOver 当鼠标指针定位在指定形状之上时的动作设置。 |
从指定集合中返回单个对象。
expression.Item(Index)
expression 必选。该表达式返回上述对象之一。
Index 必选。Variant 类型。集合中要返回的单个对象的名称或索引号。
从指定集合中返回一个对象。
expression.Item(Index)
expression 必选。该表达式返回一个 AnimationBehaviors 集合。
Index 必选。Long 类型。集合中要返回的单个对象的索引号。
返回指定边框的 LineFormat 对象。
expression.Item(BorderType)
expression 必选。该表达式返回一个 Borders 集合。
BorderType 必选。PpBorderType 类型。指定要返回的单元格或单元格范围的边框。
PpBorderType 可以是下列 PpBorderType 类型常数之一。 |
ppBorderBottom |
ppBorderDiagonalDown |
ppBorderDiagonalUp |
ppBorderLeft |
ppBorderRight |
ppBorderTop |
从指定的 Tags 集合返回单个标记。
expression.Item(Name)
expression 必选。该表达式返回一个 Tags 对象。
Name 必选。String 类型。集合中要返回的单个标记的名称。
从指定的 TextStyles 集合中返回单个文本样式。
expression.Item(Type)
expression 必选。该表达式返回一个 TextStyles 集合。
Type 必选。PpTextStyleType 类型。文本样式类型。
PpTextStyleType 可以是下列 PpTextStyleType 类型常数之一。 |
ppBodyStyle |
ppDefaultStyle |
ppTitleStyle |
Item 方法是集合的默认方法。例如,下面两行代码是等价的:
ActivePresentation.Slides.Item(1)
ActivePresentation.Slides(1)
关于返回集合中单个成员的详细信息,请参阅返回集合中的对象。
本示例为第一张幻灯片中第三个形状设置播放掌声,并使用 AnimateAction 属性指定在幻灯片放映中用鼠标单击该形状时,形状的颜色立即反转。
With ActivePresentation.Slides.Item(1).Shapes _
.Item(3).ActionSettings.Item(ppMouseClick)
.SoundEffect.Name = "applause"
.AnimateAction = True
End With
本示例在当前演示文稿幻灯片母版的正文中为第一级大纲设置首行缩进和悬挂缩进。
With ActivePresentation.SlideMaster.TextStyles.Item(ppBodyStyle)
With .Ruler.Levels.Item(1) ' sets indents for level 1
.FirstMargin = 9
.LeftMargin = 54
End With
End With
本示例将当前演示文稿第一张幻灯片中形状“Rectangle 1”的前景色设为红色。
ActivePresentation.Slides.Item(1).Shapes.Item("rectangle 1").Fill _
.ForeColor.RGB = RGB(128, 0, 0)
本示例隐藏当前演示文稿中“region”标记不包含“east”值的所有幻灯片。
For Each s In ActivePresentation.Slides
If s.Tags.Item("region") <> "east" Then
s.SlideShowTransition.Hidden = True
End If
Next