I read the documentation of VBA and couldn't convert this to Python code. I simply created shape and tried to make its align right. If I delete alignment line of code, rest code works perfectly. I don't know, I might be using wrong VBA objects and methods. I'm open to your advices. If you provide me your solution code, I would be very appreciated.
import win32com.client
app = win32com.client.Dispatch("Visio.Application")
app.Visible = True
my_shape = page.DrawRectangle(3, 3, 5, 5)) # Draw rectangle
my_shape.Text = "Hello world!" # Add text to rectangle
my_shape.LineStyle = "None" # Add some styling
my_shape.Characters.ParaProps['visHorzAlign'] = 'visAlignRight' #Tried alignment here
my_shape.SetCenter(4.4281, 3) # Change position of rectangle
Related documentations and forums that I found:
