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
 

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