Adding a shape into the document through VBA

X

xargon

Hi everyone,

I would like to know how I an add an instance of a shape that is present
in my document stencil to the visio document through VBA.

So, basically I have a shape in my document stencil called "Input" and I
would like to add an instance of it to the Visio document which is
basically like dragging and dropping the shape from the stencil into the
document.

Thanks and cheers!

xargon
 
X

xargon

Ya, it is the drop method. However, I did not know how to specify the
master shape (i.e. the master of the shape instance in the Drop method!)

So, Drop method is:

objRet = object.Drop(dropObject, x, y)

How do I specify this dropObject parameter to be the master shape that I
want to drop. I cannot set the Name property :(

Thanks!
xargon
 
J

junethesecond

If your Visio is 2003, you can record your drop operation into macro.

In short,
ActivePage.Drop Documents("DRAWTL_M.VSS").Masters.ItemU("Circle,
ellipse"), 2, 9
 

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