Using Selection.ShapeRange to control Shapes

E

excelthoughts

Hi,

In VBA, you can select shapes and control them using
Selection.ShapeRange. There is no equivalent in C#.
See
http://msdn.microsoft.com/library/d.../vbaxl11/html/xlobjShapeRange1_HV05205006.asp

In C#, the Selection(range) object does not have a ShapeRange property.


Does anyone know how to obtain a collection of the currently selected
shapes?

I am trying to simulate this VBA code.

Set aShape = srcSheet.DrawingObjects.ShapeRange.Group
x = aShape.Left
y = aShape.Top
aShape.Copy

dstSheet.Paste
Selection.Left = x
Selection.Top = y
Selection.ShapeRange.Ungroup

aShape.Ungroup
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top