C
CØstergaard
Does anyone know a way of grouping objects, e.g. a textbox, other than using
the name of every object in an array?
I am creating a lot of textboxes in a for-loop, so I have no idea, how many
boxes, that are created.
I am running Word 2000, VBA 6.0
My code looks kind of like this:
Dim Leaves() As Shape
(lot of code)
redim leaves(imax) as shape
for ix = 0 to imax 'imax migth be 0, so the code must be dynamic
Set Leaves(ix) = ActiveDocument.Shapes.AddTextbox(...)
Next ix
ActiveDocument.Shapes.Range(Array(Leaves(0).Name,
Leaves(1).Name,Leaves(2).Name )).Group
' This will not work, as I don't know, how many textboxes there are.
C. Østergaard
the name of every object in an array?
I am creating a lot of textboxes in a for-loop, so I have no idea, how many
boxes, that are created.
I am running Word 2000, VBA 6.0
My code looks kind of like this:
Dim Leaves() As Shape
(lot of code)
redim leaves(imax) as shape
for ix = 0 to imax 'imax migth be 0, so the code must be dynamic
Set Leaves(ix) = ActiveDocument.Shapes.AddTextbox(...)
Next ix
ActiveDocument.Shapes.Range(Array(Leaves(0).Name,
Leaves(1).Name,Leaves(2).Name )).Group
' This will not work, as I don't know, how many textboxes there are.
C. Østergaard