How do a cut all shapes in a selection object

G

Guest

I am writing an application in C++ that programmatically selects several
shapes and connectors then attempts to cut the objects to the clipboard but I
get a failure when ever the Cut method of the selection object is called.
The HResult returned is:0x86db0c9b. I can not find any reference to what the
error code means. Below is my code. I have checked if the selection
object is valid and in fact it is returning the correct number of shapes in
the selection object but the Cut fails.

Anyone have any ideas.
Thanks,
Mike

HRESULT hr = 0;
CVisioWindow activeWindow;
GetApp().ActiveWindow(activeWindow);
CVisioSelection selection;
hr = activeWindow.getSelection( selection );
long lCount = 0;
selection.Count(&lCount);

VVariant vv((long)visCopyPasteNormal );
hr = selection.Cut(vv);
 

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