Being somewhat of a font packrat, I'm always on the prowl for new Greek fonts. I came across Ralph Hancock's Antioch utility. I've not used the utility itself, but the fonts included with the package are nice. What kept me coming back to his site, though, was the free extras towards the bottom of the page. There's a nice AutoCorrect entry manager for Word on the Windows platform, but none for the Mac side of things.
So I found a way to use an Applescript to approximate what Hancock's VBA macros do.
Paste this script (without the equal signs above and below) into an AppleScript Editor Window:
=====
-- mechanism to keep paragraph markers from becoming part of the autocorrect
set AppleScript's text item delimiters to {"=", return}
tell application "Microsoft Word"
set theDoc to active document
set paraCount to count of paragraphs in theDoc
repeat with i from 1 to paraCount --do this for every paragraph in the document
set thePara to paragraph i of theDoc
set myRange to text object of thePara
set theText to content of myRange as string
-- parse the content of the paragraph
set delimitedList to every text item of theText
set theName to text item 1 of delimitedList -- left side
set theValue to text item 2 of delimitedList -- right side
if theValue is not "" then --skip any blank values
make new autocorrect entry at autocorrect object with properties {name:theName, autocorrect value:theValue, rich text:false}
end if
end repeat
end tell
====
Save the file in a place you can get to it. You can use the script by itself, but the more elegant way is to make it appear on the Script menu in Word by saving it into a special scripts folder. You can learn more about the Script menu in Word on the Office for Mac website.
The Script menu appears to the right of the Help menu in Word.
The default folder for this purpose in Word is
But you can get there quickly by using the About This Menu... command.
(if you want to know more about path names in Mac OS, see the Apple support document.)
Paste the entries from Hancock's autocorg.doc toward the bottom of his page, but make sure just to grab the entries and not the stuff at the top. Paste only plain text into a fresh new Word document. You'll have to edit some of the lines to your liking, of course. You'll also want the separate list for NT names, too (very useful, indeed). Add any entries you think you'll need to the list.
Run the script from your script menu or just open the script you saved and run it from there. The assumption is that the frontmost document in Word is your list of autocorrect entries. I don't know whether this script will work for Word 2004. At any rate, though the script does not change any files or do anything nefarious, use it at your own risk.
So I found a way to use an Applescript to approximate what Hancock's VBA macros do.
The Script
Paste this script (without the equal signs above and below) into an AppleScript Editor Window:
=====
-- mechanism to keep paragraph markers from becoming part of the autocorrect
set AppleScript's text item delimiters to {"=", return}
tell application "Microsoft Word"
set theDoc to active document
set paraCount to count of paragraphs in theDoc
repeat with i from 1 to paraCount --do this for every paragraph in the document
set thePara to paragraph i of theDoc
set myRange to text object of thePara
set theText to content of myRange as string
-- parse the content of the paragraph
set delimitedList to every text item of theText
set theName to text item 1 of delimitedList -- left side
set theValue to text item 2 of delimitedList -- right side
if theValue is not "" then --skip any blank values
make new autocorrect entry at autocorrect object with properties {name:theName, autocorrect value:theValue, rich text:false}
end if
end repeat
end tell
Where to Save the Script
Save the file in a place you can get to it. You can use the script by itself, but the more elegant way is to make it appear on the Script menu in Word by saving it into a special scripts folder. You can learn more about the Script menu in Word on the Office for Mac website.
The Script menu appears to the right of the Help menu in Word.
The default folder for this purpose in Word is
~/Documents/Microsoft User Data/Word Script Menu Items/
But you can get there quickly by using the About This Menu... command.
(if you want to know more about path names in Mac OS, see the Apple support document.)
The AutoCorrect Entries
Paste the entries from Hancock's autocorg.doc toward the bottom of his page, but make sure just to grab the entries and not the stuff at the top. Paste only plain text into a fresh new Word document. You'll have to edit some of the lines to your liking, of course. You'll also want the separate list for NT names, too (very useful, indeed). Add any entries you think you'll need to the list.
Run the script from your script menu or just open the script you saved and run it from there. The assumption is that the frontmost document in Word is your list of autocorrect entries. I don't know whether this script will work for Word 2004. At any rate, though the script does not change any files or do anything nefarious, use it at your own risk.
by J. W. Johnston
Assumes an "=" between the name (left side, i.e., what you type) and the value (right side, i.e., what Word replaces it with)
Seems to work best if you work with an unformatted text list.
Each desired entry must go on a line by itself, no spaces separating the "="
Use at your own risk
*)