Click here to Skip to main content
15,892,839 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am writing a Visio Addin (C#). In that addin I am dynamically adding shapes. I don't know how to change the Vertical and Horizontal text alignment.

A given shape object has text assigned to it.

Shape.Text = "Hello World";

How do I change the alignment of that text to Left Align.

Note: I belive it has something to do with this
Shape.get_CellsSRC((short)Visio.VisSectionIndices.visSectionObject, (short)Visio.VisRowIndices.visRowAlign, (short)Visio.VisCellIndices.visAlignLeft)
Posted
Updated 5-Aug-18 9:07am
Comments
Member 13938589 6-Aug-18 2:20am    
Can someone help with text alignment to top, and format text to bold I tried everything but not able to arrive at a solution.

1 solution

shape.get_CellsSRC((short)Visio.VisSectionIndices.visSectionParagraph,
(short)Visio.VisRowIndices.visRowFirst, (short)Visio.VisCellIndices.visHorzAlign).FormulaU = "0";
 
Share this answer
 
Comments
Dave Kreskowiak 5-Jan-17 8:53am    
I seriously doubt the OP is still looking for an answer after 6 years.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900