我试图在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