Get shape by Id or Name

前端 未结 4 1484
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-11 18:55

Is there any way to get a shape if you know its Id?

For example:

Dim myshape As Shape
myshape.Id = 42
myshape = getShapeById(myshape.Id)         


        
4条回答
  •  轮回少年
    2020-12-11 19:11

    sName = ActivePresentation.Slides(k).Shapes(j).Name
    

    where k is the slide number and j and the shape number on that slide.

    You can loop through each pages shapes with something like:

    k = 1
    For j = 1 To ActivePresentation.Slides(k).Shapes.Count
    Next j
    

    Chris

提交回复
热议问题