Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
This topic has not yet been rated - Rate this topic

Tags Object

Office 2007
Represents a tag or a custom property that you can create for a shape, slide, or presentation.

Remarks

Each Tags object contains the name of a custom property and a value for that property.

Create tags when you want to be able to selectively work with specific members of a collection, based on an attribute that isn't already represented by a built-in property. For example, if you want to be able to categorize slides in a presentation based on what region of the country/region they apply to, you could create a Region tag and assign a Region value to each slide in the presentation. You could then selectively perform an operation on some of the slides, based on the values of their Region tags, such as hiding all the slides with the Region value "East."

Example

Use the Add method to add a tag to an object. The following example adds a tag with the name "Region" and with the value "East" to slide one in the active presentation.

Visual Basic for Applications
ActivePresentation.Slides(1).Tags.Add "Region", "East"

Use Tags(index), where index is the name of a tag, to return a the tag value. The following example tests the value of the Region tag for all slides in the active presentation and hides any slides that don't pertain to the East Coast (denoted by the value "East").

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



Community Additions

Show:
© 2014 Microsoft. All rights reserved.