我試圖在PowerPoint中使用VBA複製粘貼形狀。
此代碼不能從If...End If
聲明中退出。
我的代碼有什麼問題?在PowerPoint中使用VBA複製粘貼形狀
Sub pasteshape()
Dim oSl As Slide
Dim oSh As Shape
For Each oSl In ActivePresentation.Slides
For Each oSh In oSl.Shapes
If oSh.Fill.Type = msoFillSolid Then
oSh.Duplicate
End If
Next
Next
End Sub
您能否澄清您的意思__此代碼無法退出If ... End If statement__?也許你需要和「Else」條款? – ainwood
@ainwood在每次遇到固體填充形狀時,都會添加「形狀」集合。循環是無限的如書面。 –
啊 - 好點。 – ainwood