1 year ago
#327962
Jon Fournier
How to bold part of text in Visio shape
I have code written for Visio 2010, which bolds part of the text in a shape in Visio. In Visio 2019, the code behaves differently, bolding all text in the shape, rather than the subset. This happens when the code runs on its own, but not when I step through, line by line.
The following is code that was generated by Visio's macro recorder, and uses exactly the same approach my code uses:
Dim vsoCharacters1 As Visio.Characters
Set vsoCharacters1 = ActiveWindow.Selection(1).Characters
vsoCharacters1.Begin = 12
vsoCharacters1.End = 50
vsoCharacters1.CharProps(visCharacterStyle) = 51#
This code also does not have the correct behavior.
Did Visio 2019 break its prior behavior? Is there a new/different way to accomplish the same thing? I need to be able to apply bold or italics to multiple parts of the text.
vba
visio
0 Answers
Your Answer