สร้างแมโคร เปลี่่ยนเลข อาราบิคเป็นไทย
การสร้างแมโครสำหรับการเปลี่ยนเลขภาษาไทยเป็นอาราบิค และเลขอารบิคเป็นไทย
การเปลี่ยนตัวเลขจากอาราบิคเป็นไทยใน Microsoft Word
CODE อาราบิค เป็น ไทย
Sub arabic_to_thai()
For i = 0 To 9
With Selection.Find
.Text = Chr(48 + i)
.Replacement.Text = Chr(240 + i)
.Wrap = wdFindContinue
End With
Selection.Find.Execute Replace:=wdReplaceAll
Next
End Sub
CODE ไทยเป็นอาราบิค
Sub thaitoarabic()
For i = 0 To 9
With Selection.Find
.Text = Chr(240 + i)
.Replacement.Text = Chr(48 + i)
.Wrap = wdFindContinue
End With
Selection.Find.Execute Replace:=wdReplaceAll
Next
End Sub