VBA代码如下(ppt)
Function GetShape(TargetSlide, Name As String)
Dim shp
For Each shp In TargetSlide.Shapes
If shp.Name = Name Then
Exit For
End If
Next shp
GetShape = shp
End Function
这是结果
环境:Microsoft Office 2007