Hi Guys,
I am using Mac OS X (Mountain Lion), Microsoft word for Mac 2011 and Applescript Editor (Version 2.6.1)
I had a word documents which contains English and Non-English Languages such as Japanese, Chinese etc., I want to find out the English characters and to Change the font as “Arial”.
I tried it in the way of searching ASCII characters by the below code.
But it changing the lower case characters to Uppercase. How to fix it?
tell application "Microsoft Word"
set myList to {32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 160, 163, 164, 165, 167, 168, 169, 170, 180, 181, 183, 185, 189, 191, 219, 224, 246, 32, 116, 97, 98}
set coulist to length of myList
try
repeat with counter from 1 to coulist
set val to item (counter) of myList
set var to ASCII character val
set myuniFind to find object of text object of active document
set match case to true
clear formatting myuniFind
set content of myuniFind to var
clear formatting replacement of myuniFind
set name of font object of myuniFind to "Arial"
set content of replacement of myuniFind to var
execute find myuniFind replace replace all
set counter to counter + 1
end repeat
end try
end tell
Please let me know, if I am going on the right way. Or Is there is any other way to do it.
Thanks in Advance
Mathews