getting a font name in visio

O

Olivier

Hello,

I am getting the font of the text in a shape with the following line in VB6
vsoobject.CellsSRC(visSectionCharacter, 0, visCharacterFont).FormulaU
I need to get the actual name of this font ( i.e. Arial, Helvetica, etc.)
How do I do this?

thanks,

Olivier
 
P

Peter Suter

Hi
Olivier

Hello,

I am getting the font of the text in a shape with the following line in
VB6
vsoobject.CellsSRC(visSectionCharacter, 0, visCharacterFont).FormulaU
I need to get the actual name of this font ( i.e. Arial, Helvetica,
etc.)
How do I do


Get FontName from Document.Fonts.Item

Try Sample:

Dim iFontNdx As Integer
iFontNdx = oShp.CellsSRC(visSectionCharacter, 0, visCharacterFont).ResultIU
MsgBox iFontNdx & " " & Application.ActiveDocument.Fonts.Item(iFontNdx)


Peter
 

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