2016-08-23 129 views
0

我正在尋找一種自動方式來取消組合表中的表以創建形狀。VBA - 在PowerPoint中取消組合表

我發現下面的教程:

Tutorial

此外,我想錄制宏(我很新的VBA),但是在功率點2010宏錄製暫時不提供任何更多。任何建議,如何在vba中創建上述教程?

我很感謝你的回覆!

回答

1

下面是一個讓你開始的例子。請務必首先選擇要使用的表格。

Sub PasteAndUngroup() 
    Dim oSh As Shape 
    Dim oSl As Slide 

    Set oSh = ActiveWindow.Selection.ShapeRange(1) 
    Set oSl = oSh.Parent 

    oSh.Copy 

    Set oSh = oSl.Shapes.PasteSpecial(ppPasteEnhancedMetafile)(1) 

    oSh.Ungroup 

End Sub