How to use the dropmethod in Visio 2007, to resize an object

R

Ray Burman

I am attemping to pick an object from an existing stencil, and then to use
the drop object method to put the object on the page, what I dont understand
is how to resize the object. I know that I supply the object with the X,Y
cordinates, but how do I size it?
 
J

John Goldsmith

Hello Ray,

the Drop method returns a shape object (whether you use it or not) so you
set a shape reference as you drop the shape on the page. Try the following
(which assumes the Basic Flowcharts Stencil is open):

Sub AddShapeAndSize()
Dim shp As Shape
Dim pag As Page
Dim mst As Master

Set mst =
Application.Documents.Item("BASFLO_M.VSS").Masters.ItemU("Process")
Set pag = ActivePage
Set shp = pag.Drop(mst, 1, 2)
shp.Cells("Width").FormulaU = "100mm"

End Sub

Best regards

John


John Goldsmith
www.visualSignals.co.uk
 

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