The two objects are in the drawing canvas (a requirement for other objects in the same document).Īny thoughts? I started out trying to access it through Selection, but backed up to this.if nothing else, i can do them all at once. The code bombs on the ungroup with a 404 error - This member cannot be accessed on an object in a group. You can group shapes with a command like this: Dim ws as Worksheet Set ws ActiveSheet <- Set to the worksheet you are working on ws.Shapes.
MsgBox sh.Name & ' ' & sh.Type ' verification accessing the shape MsgBox ActiveDocument.Shapes(1).GroupItems.Count 'shows two - correctįor Each sh In ActiveDocument.Shapes(1).GroupItems Here's the code I have so far (at this point, just trying to access the object/shape within VBA): Since I have several of these shapes, I've been trying to automate realignment (Draw ungroup, align middles, group) for the selected object to put the code behind a button for the user. When you enter text into the text box, it grows (as expected), but the line and arrow don't change position relative to the middle. I have a 'group' shape, a line entering a textbox to the left, text box, an arrow exiting the text box on the right.