In the case of the OrgCharts, there is a setting you could interrogate to find out if it is collapsed or not. Then it is a case of calling the relevant addon macro. If your shape subselects on double clicking then you will need to change Selection to 'Group only' in the behavior dialog.
Code:
Sub ShowerOrGrower()
Dim sel As Visio.Selection, aShp As Visio.Shape
Set sel = ActiveWindow.Selection
Set aShp = sel.PrimaryItem
If aShp.CellsU("User.ShowSubordinates").Formula = 0 Then
Call Visio.Application.Addons("OrgC11").Run("/expandsubordinates")
Else
Call Visio.Application.Addons("OrgC11").Run("/hidesubordinates")
End If
End Sub