Share via


ActionSettings.Item Method

PowerPoint Developer Reference

Returns a single action setting from the specified ActionSettings collection.

Syntax

expression.Item(Index)

expression   A variable that represents an ActionSettings object.

Parameters

Name Required/Optional Data Type Description
Index Required PpMouseActivation The action setting for a MouseClick or MouseOver event.

Return Value
ActionSetting

Remarks

The

Index

parameter value can be one of these PpMouseActivation constants.

Constant Description
ppMouseClick The action setting for when the user clicks the shape.
ppMouseOver The action setting for when the mouse pointer is positioned over the specified shape.

The Item method is the default member for a collection. For example, the following two lines of code are equivalent:

Visual Basic for Applications
  ActivePresentation.Slides.Item(1)
Visual Basic for Applications
  ActivePresentation.Slides(1)

For more information about returning a single member of a collection, see Returning an Object from a Collection.

Example

This example sets shape three on slide one to play the sound of applause and uses the AnimateAction property to specify that the shape's color is to be momentarily inverted when the shape is clicked during a slide show.

Visual Basic for Applications
  With ActivePresentation.Slides.Item(1).Shapes _
        .Item(3).ActionSettings.Item(ppMouseClick)
    .SoundEffect.Name = "applause"
    .AnimateAction = True
End With

See Also