Change Shape Font

M

Michael

Im trying to change the Font (and size) of the text in shapes
programmatically. But i cant find the right code to get and set the Font of a
selected Shape. I know how get the selected shapes, but not the code to
get/set the font.

Could someone help me.

Thanks,
Michael
 
A

Al Edlund

You might try something like this

Set visText = visShape.Characters

visText.Text = strFieldPrompt

' Set the character color of the text to blue.
visText.CharProps(visCharacterColor) = visBlue

' Set the font size of the text to 9.
visText.CharProps(visCharacterSize) = 9

visText.CharProps(visCharacterStyle) = _
visBold + _
visItalic

also this is a great post

http://blogs.msdn.com/visio/archive/2006/08/18/704811.aspx


al
 
Top