Discussion:
how to align text in a rectangular shape programmatically
(too old to reply)
Jagadeesh
2007-01-20 07:12:00 UTC
Permalink
i created a rectangular shape and i need to align the text in the shape. i
looked at the shapesheet, there by modifying the "halign" we can change the
alignment. But, i don't know to modify it programmatically...plz help me
John Marshall, MVP
2007-01-20 22:57:43 UTC
Permalink
Cheat!

Record the activity you want with the macro recorder and then check the
generated code. ;-)

John... Visio MVP

Need stencils or ideas? http://visio.mvps.org/3rdparty.htm
Need VBA examples? http://visio.mvps.org/VBA.htm
Visio Wishlist http://visio.mvps.org/wish_list.htm
Post by Jagadeesh
i created a rectangular shape and i need to align the text in the shape. i
looked at the shapesheet, there by modifying the "halign" we can change the
alignment. But, i don't know to modify it programmatically...plz help me
Chris Roth [MVP]
2007-02-04 06:42:37 UTC
Permalink
Hi Jagadeesh,

Something like this:

Dim shp as Visio.Shape
Set shp = Visio.ActiveWindow.Selection(1)
shp.Cells("HAlign").ResultIU = 2
--
Hope this helps,

Chris Roth
Visio MVP

Free Visio shapes:
http://www.visguy.com/category/shapes
Visio programming info:
http://www.visguy.com/category/programming/
Other Visio resources:
http://www.visguy.com/visio-links/
Post by Jagadeesh
i created a rectangular shape and i need to align the text in the shape. i
looked at the shapesheet, there by modifying the "halign" we can change the
alignment. But, i don't know to modify it programmatically...plz help me
Loading...