grouping shapes and convert to inline shape 
Author Message
 grouping shapes and convert to inline shape

I have several shapes created by VBA code associated to a document.
I use different type of shapes, created either by
ActiveDocument.Shapes.AddPolyline(plotArray) or
ActiveDocument.Shapes.AddLine(beginX, beginY, endX, endY) or
ActiveDocument.Shapes.AddShape(msoShapeRectangle, ...) or
ActiveDocument.Shapes.AddTextbox(msoTextOrientationUpward, ...)
Some of the shapes are visible (.visible = true), other are not (.Visible =
false).

At a given step of the processing, I want to group all the visible shapes
(only those ones) in one shape, convert this grouped result in Inline shape
and copy it to be able to paste it in an other document as a drawing inline
with text.

I am looking for the code for this. Can anybody help ?



Tue, 22 Feb 2005 00:59:21 GMT  
 grouping shapes and convert to inline shape

make a shaperange and add the shapes to it. Here's something similar I
did for pre-selected items.

Public Sub ToggleGrouping()
'Ctrl+Shift+G
With Selection.ShapeRange
   If .Count > 0 Then
      If .Count > 1 Then
         .Group
      Else
         .Ungroup
      End If
   End If
End With
End Sub


that went like this:

Quote:
>I have several shapes created by VBA code associated to a document.
>I use different type of shapes, created either by
>ActiveDocument.Shapes.AddPolyline(plotArray) or
>ActiveDocument.Shapes.AddLine(beginX, beginY, endX, endY) or
>ActiveDocument.Shapes.AddShape(msoShapeRectangle, ...) or
>ActiveDocument.Shapes.AddTextbox(msoTextOrientationUpward, ...)
>Some of the shapes are visible (.visible = true), other are not (.Visible =
>false).

>At a given step of the processing, I want to group all the visible shapes
>(only those ones) in one shape, convert this grouped result in Inline shape
>and copy it to be able to paste it in an other document as a drawing inline
>with text.

>I am looking for the code for this. Can anybody help ?

Steve Hudson -- Word Heretic, Sydney, Australia
{*filter*} teacher, trainer, tutor, writer, developer

Word MVP FAQs: http://www.*-*-*.com/
You agree by writing to me personally that any material can be reused publicly unless you explicitly disclaim it. (For List and blog use.)


Thu, 24 Feb 2005 00:12:48 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Convert Inline to Shape and Anchor Shape

2. Converting Inline shape to floating graphics?

3. Dynamically convert shapes to Process Engineering shapes

4. Shapes shapes shapes

5. Q:Replace inline shape with text in word doc

6. Modify an Inline shape

7. Recorded code to shadow inline shape fails

8. Adding text into an Inline Shape

9. Resizing Excel Inline Shape to show more rows / columns

10. Inline Shapes vs Fields - brain teaser

11. new shape in another shape

12. Adding a shape from Forms Shapes Stencil

 

 
Powered by phpBB® Forum Software