Visio xml from clipboard

A

Andy

I'm using Visio 2003 with VBA and VB6.

What I would like to achieve is the current selection as xml, to allow
me to export a set of shapes from one diagram to another. It seems
that I can only export a whole diagram as XML.

There is mention of the clipboard supporting custom data formats,
"Visio 11.0 Shapes" and "Visio 11.0 Text". Has anyone succeded in
using these from vb, does the Text equate to XML for the shapes in the
clipboard?

Thanks
 
N

Nikolay Belyh

Andy:
I'm using Visio 2003 with VBA and VB6.

What I would like to achieve is the current selection as xml, to allow
me to export a set of shapes from one diagram to another.

Why don't you just copy that shapes from one diagram to another?
(i.e. using "Drop" method?)

Set myShapes = srcWindow.Selection ' selection should contain shapes
to copy
dstPage.Drop myShapes, 0, 0 ' adjust coordinates as needed

This works just fine even for case when "srcWindow" and "dstPage"
belong to two different Visio applications.
 

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