Selection[].Group is giving COM Error

  • Thread starter shailendrasingh823
  • Start date
S

shailendrasingh823

Hi All,

When I am trying to execute following code I am getting COM HReslut
error


/////////Create the new selection array +1 value
int sizeSelection = SelectionArray.Length;
sizeSelection = sizeSelection + 1;
ReDimSelection(ref SelectionArray, sizeSelection);
SelectionArray[sizeSelection - 1] = window.Selection;
SelectionArray[sizeSelection -
1].Select((Visio.Shape)DroppedShape, 2);
Visio.Shape
shape=null;
shape = (Visio.Shape) SelectionArray[sizeSelection-1].Group();///
Here is problem
shape.Text =
shapeinfo.GetAreaName();
DroppedShape.Group();

If any body can tell me where am I wrong & how to perform this
Grouping

Shail
 
M

Mark Nelson [MS]

I tried equivalent code on some rectangles in VBA and it worked. Have you
eliminated the array bits to see if that was causing the problem? Have you
tried the code on some basic rectangles to make sure the shapes weren't the
issue?

--
Mark Nelson
Office Graphics - Visio
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.
 

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