在早期版本的 PPT 中完美运行的代码在 2016 年停止运行。当我尝试更改图表中形状的左侧属性时,出现Method left of object shape failed
错误。我可以完美地阅读该.Left
属性。
我的想法不多了?我能做些什么?
Sub test11()
Dim sld As Slide
Dim objChart As Object
Dim shpBubble As Object
Set sld = ActivePresentation.Slides("ScatterPlot01_Purch6")
Set objChart = sld.Shapes("Chart01").Chart
sld.Select
objChart.Select
Set shpBubble = objChart.Shapes("P01")
'shpBubble.Select
Debug.Print shpBubble.Left, shpBubble.Visible
shpBubble.Left = 10
End Sub