Table of contents
Collapse the table of content
Expand the table of content

ThemeVariant.Id Property (PowerPoint)

office 365 dev account|Last Updated: 6/12/2017
1 Contributor

Returns a string that represents the ID of the theme variation. Read-only.


expression. Id

expression A variable that represents a ThemeVariant object.


This example opens a theme file, iterates through the variants in the theme, and prints the name and ID of each variation in the theme.

Sub IterateThemeVariants()

    Dim pptTheme As Theme
    Dim pptThemeVariants As ThemeVariants
    Dim pptThemeVariant As ThemeVariant
    Dim path As String

    ' Get a reference to the currently active theme.
    path = "C:\Program Files (x86)\Microsoft Office\Document Themes 15\" &; _
        ActivePresentation.TemplateName &; ".thmx"
    Set pptTheme = Application.OpenThemeFile(path)

    ' Get a reference to all of the variations in the theme.
    Set pptThemeVariants = pptTheme.ThemeVariants

    ' Iterate over each variation of the theme and print
    ' its name and ID.
    For Each pptThemeVariant In pptThemeVariants

        Debug.Print "Variation " &; &; " id: " &; pptThemeVariant.Id

    Next pptThemeVariant

End Sub

Property value


© 2018 Microsoft