0

I'm trying to change the font size of the text within shapes in Visio from data exported from an Excel document using Visual Basic. I need there to be different font sizes for different shapes. Is there a Shape.FontSize = X method or something similar in VBA? I'm new to Visual Basic so apologies if this is a rookie question. Thank you for your help!

PythonParka
  • 134
  • 3
  • 13

2 Answers2

2

In MS Visio you can change properties in ShapeSheetâ„¢ environment for change font parameters

  Dim shp As Shape 
  Set shp = ActivePage.Shapes.ItemFromID(4) 
  shp.Cells("Char.Size").FormulaU = "12 pt" 
Surrogate
  • 1,466
  • 2
  • 11
  • 13
0

I find another way change font size

Dim shp As Shape 
Set shp = ActivePage.Shapes.ItemFromID(1) 
With shp.Characters 
   ' set font size - 6 pt
   .CharProps(visCharacterSize) = 6 
   ' set font bold, italic and underline
   .CharProps(visCharacterStyle) = visBold + visItalic + visUnderLine 
End With 
Surrogate
  • 1,466
  • 2
  • 11
  • 13