Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-15-2019, 12:58 AM
jhansrod jhansrod is offline using Arabic in VBA Windows 10 using Arabic in VBA Office 2016
Novice
using Arabic in VBA
 
Join Date: Jun 2019
Posts: 16
jhansrod is on a distinguished road
Default using Arabic in VBA

Hi all

I am trying to assign arabic text as per the code below,

Code:
With ActiveDocument.SelectContentControlsByTitle("OFFICEHEAD")(1)
  .LockContents = False
   Select Case Split(StrDetails, "|")(0)
     Case "KSA": .Range.Text = "شركة"
   End Select
  .LockContents = True
End With
However, in the VBA editor the arabic text shows up as


Code:
     With ActiveDocument.SelectContentControlsByTitle("OFFICEHEAD")(1)
      .LockContents = False
      Select Case Split(StrDetails, "|")(0)
       Case "KSA": .Range.Text = "????"
       Case "OFFICE02": .Range.Text = "OFFICE02 HEADER"
       Case Else: .Range.Text = "JUST HEADER"
      End Select
      .LockContents = True
     End With
Any suggestions on how I can get the editor to use Arabic text ?

Thank you
J
Reply With Quote
  #2  
Old 06-15-2019, 06:13 AM
gmayor's Avatar
gmayor gmayor is offline using Arabic in VBA Windows 10 using Arabic in VBA Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,105
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

In theory you should be able to set the System Locale in the regional settings to Arabic and then type in English or Arabic in the VBA editor..

Region and Language Settings > Administrative Language Settings > Administrative Tab > Change System Locale (Do not check the Beta checkbox as that doesn't work in any version I have used). You will then have to reboot Windows.

I am not familiar with Arabic which is a right to left language, but I have used this before for Greek and Russian, which are left to right. It won't change your system interface so you can try it for yourself.

You may need to set the VBA editor to use the Courier Arabic font to give you the extended character set required.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
I need Proofing Tool for Arabic sami1900 Word 0 11-07-2012 12:56 PM
Arabic word order SimonCramer Word 0 02-23-2012 03:02 PM
Arabic typing problem mfarhan_ahmed Word 2 01-01-2012 06:42 AM
Please help!!! Arabic encoding justry Word 1 04-30-2010 08:15 AM
arabic language typing shariefbe Word 1 08-09-2009 12:19 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:52 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft