• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
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


  • Subject: Re: Need help with MS Word 2004 languages and dictionaries
  • From: Paul Berkowitz <email@hidden>
  • Date: Mon, 02 May 2005 13:01:09 -0700

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>)

  • Prev by Date: Raw class specifiers that AppleScript won't mess with
  • Next by Date: Stripping the target application specifier from an AppleScript object reference
  • Previous by thread: Re: Need help with MS Word 2004 languages and dictionaries
  • Next by thread: Video problems after setting QuickTime to fullscreen?
  • Index(es):
    • Date
    • Thread