How to add a shape to a group with VBA in Visio

How can you add a shape to an existing group in visio, without ungrouping , because I have a lot of custom properties in my group. I do not want subformulas to use it for destruction.

Here is the beginning of my VBA code, but I cannot find a way to add the form to the group.

Sub moveToGroup(OrigineShape As Shape, DestinationGroup As Shape) End Sub 

Thank you all for your answers.

+4
source share
1 answer

It was really easy!

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

Just remember to use Set for this purpose, as this creates an error.

+4
source

All Articles