Hello,
I'm trying to create a macro for X6 that will set up various text settings in CorelDraw. Some of them are available in the Object Parameters docker in the Character section. I figured out that these are stored in the Sty.Character.Style Properties. I successfully managed to create a macro that read these. Now I know which ones to change and what values should I assign. The problem is I cannot set these. The snippet below is supposed to assign values to 6 Params and then reads them. Problem is they remain unchanged. Any idea why?
Dim my_object As Shape For Each my_object In ActiveSelectionRange.Shapes If my_object.Type = cdrTextShape Then my_object.Style.Character.Style.SetProperty "kern", 1 my_object.Style.Character.Style.SetProperty "lnum", 1 my_object.Style.Character.Style.SetProperty "onum", 0 my_object.Style.Character.Style.SetProperty "palt", 1 my_object.Style.Character.Style.SetProperty "pnum", 1 my_object.Style.Character.Style.SetProperty "tnum", 0 MsgBox my_object.Style.Character.Style.GetPropertyAsString("kern") & " " & _ my_object.Style.Character.Style.GetPropertyAsString("lnum") & " " & _ my_object.Style.Character.Style.GetPropertyAsString("onum") & " " & _ my_object.Style.Character.Style.GetPropertyAsString("palt") & " " & _ my_object.Style.Character.Style.GetPropertyAsString("pnum") & " " & _ my_object.Style.Character.Style.GetPropertyAsString("tnum") End If Next my_object
Regards, Paul
try use another properties:
my_object.Properties("kern", 1) = 254 'random value
MsgBox my_object.Properties("kern", 1)