Text Orientation via code

Hello, I'm working with CorelDRAW X8 and a VB application.

No issues launching Corel from VB, creating objects, etc.

However, I need to set the text orientation to Vertical in a shape I create via code.

I'm using the CreateArtisticText method from: https://community.coreldraw.com/sdk/api/draw/22.1/m/layer.createartistictext

And that works, but I cannot find a way to set the orientation.

I tried recording a Macro in Corel itself, but when I change the orientation of the text it says: Recording of this command is not supported.

I've been looking in the SDK, but cannot find a property/method to do it.

Any idea if it's available somewhere?

Thank you!

Parents
  • I don't know if there is a way that you can use this in your project, but there is a way to "push the button" in a VBA macro to get vertical text orientation:

    Sub vertical_text()
    Dim sr As ShapeRange
    Dim s As Shape
    
        Set sr = ActivePage.Shapes.FindShapes(Query:="@type = 'text:artistic'")
        For Each s In sr
            s.CreateSelection
            Application.FrameWork.Automation.InvokeItem "e243b0da-2586-43f0-a3d9-4251ff9f7213"
        Next s
    End Sub
    

    I am not aware of any way to read or set the text orientation directly using the API.

Reply Children
No Data