This documentation is archived and is not being maintained.

Item Method

Office 2003

Returns a single action setting from the specified ActionSettings collection.

expression.Item(Index)

expression    Required. An expression that returns an ActionSettings collection.

PpMouseActivation can be one of these PpMouseActivation constants.
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.

Returns a single object from the specified collection.

expression.Item(Index)

expression    Required. An expression that returns one of the above objects.

Index   Required Variant. The name or index number of the single object in the collection to be returned.

Returns a single object from the specified collection.

expression.Item(Index)

expression    Required. An expression that returns an AnimationBehaviors collection.

Index   Required Long. The index number of the single object in the collection to be returned.

Returns a LineFormat object for the specified border.

expression.Item(BorderType)

expression    Required. An expression that returns a Borders collection.

PpBorderType can be one of these PpBorderType constants.
ppBorderBottom
ppBorderDiagonalDown
ppBorderDiagonalUp
ppBorderLeft
ppBorderRight
ppBorderTop

Returns a single tag from the specified Tags collection.

expression.Item(Name)

expression    Required. An expression that returns a Tags object.

Name   Required String. The name of the single tag in the collection to be returned.

Returns a single text style from the specified TextStyles collection.

expression.Item(Type)

expression    Required. An expression that returns a TextStyles collection.

PpTextStyleType can be one of these PpTextStyleType constants.
ppBodyStyle
ppDefaultStyle
ppTitleStyle

Remarks

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

ActivePresentation.Slides.Item(1)
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.

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

This example sets the first-line indent and the hanging indent for outline level one in body text on the slide master for the active presentation.

With ActivePresentation.SlideMaster.TextStyles.Item(ppBodyStyle)
    With .Ruler.Levels.Item(1) ' sets indents for level 1
        .FirstMargin = 9
        .LeftMargin = 54
    End With
End With
				

This example sets the foreground color to red for the shape named "Rectangle 1" on slide one in the active presentation.

ActivePresentation.Slides.Item(1).Shapes.Item("rectangle 1").Fill _
    .ForeColor.RGB = RGB(128, 0, 0)
				

This example hides all slides in the active presentation that don't have the value "east" for the "region" tag.

For Each s In ActivePresentation.Slides
    If s.Tags.Item("region") <> "east" Then
        s.SlideShowTransition.Hidden = True
    End If
Next
				


See Also | Item Method


Show: