Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Need help with MS Word 2004 languages and dictionaries
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Need help with MS Word 2004 languages and dictionaries



On 5/2/05 11:25 AM, I wrote:

> For your second question, I think it would be too risky to try to coerce
> the string back to the language ID via 'run script', even using the 'name'
> string rather than the 'name local'.

If you wanted to do it, with no risk but less attractive user interface,
you'd simply make up the list of available languages with the lower-case
enumerations 'as string':

tell application "Microsoft Word"
    set languageList to {}
    try
         set end of languageList to danish as string
    end try
    try
        set end of languageList to german as string
    end try
    --etc

    set chosenLanguage to item 1 of (choose from list languageList)
    set chosenLaguageID to run script chosenLanguage -- gets the enumeration
back
end tell

Note that if you somehow needed to get the enumerations 'as string' out of
Word tell block, say writing to a text file or something, you first need to
preface all such manipulations with:

run script "tell application \"Microsoft Word\"
end tell"

..one of those strange peculiarities of AppleScript. Otherwise the export
constants appear as their «raw codes» instead of the English language
constants you expect.


--
Paul Berkowitz


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >RE: Need help with MS Word 2004 languages and dictionaries (From: Richard Rönnbäck <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.