Hello, I try to set the property of some characters in a Characters.CharProps object using a VBS script. This script works in previous versions, starting from Visio 2019 (Microsoft® Visio® 2019 MSO (Version 2202 Build 16.0.14931.20118) 32-bit) the behavior is random, at two successive runs different results are obtained. Apparently the property settings for a part of a string (begin end) no longer work.
example:
set ashape4 = appl.ActiveWindow.Page.DrawRectangle(2.225,2.600,5.392,1.200)
ashape4.RowType(5, 0) = 151
set chars = ashape4.Characters
chars.Begin = 0000
chars.End = 0000
chars.Text ="text line1" & Chr(10)
chars.Text ="text line2" & Chr(10)
chars.Begin = 0010
chars.End = 0020
chars.CharProps(1) = 2
For this code the color is set for all the text in the shape not only for line 2. I want to set certain lines with text properties: color, bold, italic..
Do you have any idea if these instructions are no longer supported? I tried macro recording and the behavior is still wrong.
Thanks