I work in an organisation with 47 member states and two official languages, English and French. I would like to be able to produce a simple macro that would run through a Corel Draw graphic (e.g. a pie-chart) and change the names of all the countries from English to French.
I tried recording a macro, but the result was a series of messages in the macro telling me that “Recording of this command is not supported: TextEdit”.
Does anyone know if it’s possible to do what I want?
Something like this:
For Each s In ActiveDocument.ActivePage.Shapes If s.Type = cdrTextShape Then If s.Text.Story = "Canada" Then s.Text.Story = "le Canada" Else If s.Text.Story = "United States" Then s.Text.Story = "les États-Unis" Else If s.Text.Story = "..." Then s.Text.Story = "..."
.... do the same for other countries...
End If End If
Next s
<Hendrik Wagenaar> wrote in message news:48817@coreldraw.com... Something like this....
Something like this....
Thanks for the suggestion. I tried making a macro on this basis.
Else If was flagged in red, which disappeared when I changed it to ElseIf. The resulting test routine looks like
For Each s In ActiveDocument.ActivePage.Shapes If s.Type = cdrTextShape Then If s.Text.Story = "Andorra" Then s.Text.Story = "Andorre" ElseIf s.Text.Story = "Albania" Then s.Text.Story = "Albanie" Next s
It doesn’t throw up any errors when I run it – but it doesn’t modify anything either. The existing text labels are artistic text; I added some paragraph text to see if that worked, but seems not.