Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grouping Shapes in Word 97

Status
Not open for further replies.

peterkin9

Programmer
Oct 10, 2002
6
GB
I am trying to group a variable number of shapes to help with the process of flowcharting a program. I realise that I should really be doing it in Visio, but I am using Word.
I have based my code on that which is created by a macro -

ActiveDocument.Shapes.Range(Array("AutoShape 4758", _
"Line 4759", "Line 4760")).Select
Selection.ShapeRange.Group.Select

I have changed this to

ActiveDocument.Shapes.Range(Array(strGroup)).Select
Selection.ShapeRange.Group.Select

Each time a shape or line that is to be added to the group is added to the Shapes Collection, I add its name to the string variable strGroup. When all the shapes have been created, if I paste the contents of strGroup into the brackets it works, but if I use the name of the string, then I get run time error '9'

The item with the specified name wasn't found.

Has anyone else tried something similar please?

Many thanks

Peter Kinsman
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top