How to name an object within a PowerPoint slide?

前端 未结 5 2202
滥情空心
滥情空心 2020-12-02 16:42

So I know how to name a textbox, or a like object in PowerPoint with VB, but I was wondering if there was a way to name objects through the Ribbon (PowerPoint 2007). For ins

5条回答
  •  無奈伤痛
    2020-12-02 17:27

    THIS IS NOT AN ANSWER TO THE ORIGINAL QUESTION, IT'S AN ANSWER TO @Teddy's QUESTION IN @Dudi's ANSWER'S COMMENTS

    Here's a way to list id's in the active presentation to the immediate window (Ctrl + G) in VBA editor:

    Sub ListAllShapes()
    
        Dim curSlide As Slide
        Dim curShape As Shape
    
        For Each curSlide In ActivePresentation.Slides
            Debug.Print curSlide.SlideID
            For Each curShape In curSlide.Shapes
    
                    If curShape.TextFrame.HasText Then
                        Debug.Print curShape.Id
                    End If
    
            Next curShape
        Next curSlide
    End Sub
    

提交回复
热议问题