Visio Guy

Solution-specific Visio Discussions => Artistic and Graphical Effects => Topic started by: tabuariki on July 14, 2023, 04:52:16 PM

Title: Rotate text issue?
Post by: tabuariki on July 14, 2023, 04:52:16 PM
im having trouble finding resources for using visio with vba macros. there are multiple things im trying to work out, but currently i need my text to rotate 90 degrees counter clockwise. visShape.CellsU("TextDirection").FormulaU = "1" works with rotating counterclockwise, but visShape.CellsU("TextDirection").FormulaU = "2" and visShape.CellsU("TextDirection").FormulaU = "3" do nothing. any suggestions?
Title: Re: Rotate text issue?
Post by: Nikolay on July 14, 2023, 06:05:31 PM
visShape.CellsU("TxtAngle").FormulaU = "90 deg"
Title: Re: Rotate text issue?
Post by: wapperdude on July 15, 2023, 12:50:20 AM
The TextDirection cell is not used for angular rotations.  It only allows the text to flow horizontally or vertically.  Allowed entry values are either 0 or 1.  See https://learn.microsoft.com/en-us/office/client-developer/visio/textdirection-cell-text-block-format-section (https://learn.microsoft.com/en-us/office/client-developer/visio/textdirection-cell-text-block-format-section)

For more comprehensive text treatment, see Designing Text Behavior, https://learn.microsoft.com/en-us/previous-versions/office/developer/office-xp/aa200986(v=office.10) (https://learn.microsoft.com/en-us/previous-versions/office/developer/office-xp/aa200986(v=office.10))