2012-12-19 51 views
4

如何將圖形添加到Visio中的現有組中,未取消組合,因爲我的組形狀表中有很多自定義屬性。我不想讓subformulas使用它被打破。如何在Visio中使用VBA添加形狀到組中

這是我的VBA代碼的開始,但我找不到在組中添加形狀的方法。

Sub moveToGroup(OrigineShape As Shape, DestinationGroup As Shape) 


End Sub 

謝謝大家的回答。

回答

4

這其實很簡單!

Sub moveToGroup(OrigineShape As Shape, DestinationGroup As Shape) 
    OrigineShape.Parent = DestinationGroup 
End Sub 

只要記住不要用Set這個任務,因爲這樣做會產生錯誤。

+1

感謝您的編輯@cxw –

相關問題