Theme.ThemeVariants-Eigenschaft (PowerPoint)

Gibt eine ThemeVariants-Auflistung zurück, die die Variationen im Design darstellt.

Syntax

Ausdruck. ThemeVariants

Ausdruck Eine Variable, die ein 'Theme'-Objekt darstellt.

Beispiel

Das folgende Codebeispiel ruft einen Verweis auf das aktuell aktive Design ab und durchläuft dann jede Designvariation im Design.

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 ID.
    For Each pptThemeVariant In pptThemeVariants
    
        Debug.Print "Variation id: " & pptThemeVariant.Id
    
    Next pptThemeVariant

End Sub

Eigenschaftswert

THEMEVARIANTS

Support und Feedback

Haben Sie Fragen oder Feedback zu Office VBA oder zu dieser Dokumentation? Unter Office VBA-Support und Feedback finden Sie Hilfestellung zu den Möglichkeiten, wie Sie Support erhalten und Feedback abgeben können.