2012-04-03 76 views
0

我想删除之前搜索过的特定章节内的图片。 有人可以指出我做到这一点的正确方法... 这是我写到目前为止的代码。Word VBA - 删除特定段落内的形状

If insideparagraph Then 

     'error is here 
     Dim o As Word.InlineShape 
     For Each o In DocPara.Range 
     o.Delete 
     Next 

    End If 

回答

0

您可能需要调整和测试这个

If insideparagraph Then 

    Dim o As Word.InlineShape 
    For Each o In DocPara.Range.InlineShapes 
    o.Delete 
    Next 

End If 
+0

韩国社交协会,Kiru,我现在把它 – Fcoelho 2012-04-03 09:56:32