Looks like you used ChatGPT to write this.
It tries to use Let and Set, but they are not supported in the XPression version of VB.
Careful with AI/LLM's, there's a number of things they don't understand about XPression.
Dim scene As xpScene
Dim textObj As xpTextObject
Dim kashida As String
Dim originalText As String
Dim styledText As String
scene.GetObjectByName("TextObject2", textObj)
kashida = "ـ"
originalText = "المجاعة"
styledText = "الـ" & kashida & "مـ" & kashida & "جـ" & kashida & "اعـ" & kashida & "ة"
textObj.Text = styledText
------------------------------
Simon Redmile
Senior Graphic Programmer & Designer
Ross Video
Bristol United Kingdom
------------------------------
Original Message:
Sent: 07-07-2025 18:59
From: Yazan Tamer
Subject: Arabic font issue
I have issue with arabic to justify the font like the following
شهد العالم موجة حارة
شـهـد الـعـالـم مـوجـة حـارة
I wrote a script but it didn't compile
here is the script
Dim scene As xpScene
Dim textObj As xpTextObject
Dim kashida As String
Dim originalText As String
Dim styledText As String
' Load your scene
Set scene = Engine.GetSceneByName("YourSceneName")
' Get the text object
Set textObj = scene.GetTextObjectByName("TextObject2") ' Adjust name as needed
' Define Kashida character
kashida = "ـ"
' Original Arabic text
originalText = "المجاعة"
' Insert Kashida manually between connectable letters
styledText = "الـ" & kashida & "مـ" & kashida & "جـ" & kashida & "اعـ" & kashida & "ة"
' Apply to text object
textObj.Text = styledText
any help?
------------------------------
Yazan Tamer
Graphic Designer
ON TV
------------------------------