• 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: Targetting a specific Word version
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Targetting a specific Word version


  • Subject: Re: Targetting a specific Word version
  • From: Philip Aker <email@hidden>
  • Date: Fri, 30 May 2008 03:50:12 -0700

On 08-05-30, at 02:41, Sjur Moshagen wrote:

Den 29. mai. 2008 kl. 17.20 skrev Philip Aker:

On 08-05-29, at 06:38, email@hidden wrote:

there is a special clause that you have to use so that your script uses the app's dictionary even while your "tell" is a calculated one. It's something like "using application terminology" but I'm sorry I can't remember exactly.

using terms from application "XXX"
-- doit
end using terms from

Thanks for the help. In my case, it does NOT work though:

on run
set HDname to (path to startup disk as text)
set Word2004 to HDname & "Applications:Microsoft Office 2004:Microsoft Word"
using terms from application Word2004
set MSWordVersion2004 to application version
end
display dialog "MSWord 2004 version:" & MSWordVersion2004 & return & return & Word2004
end run

gives a compilation error:

--------
Syntax error

Can't change the data to the expected type. [or something similar - my translation of the Norwegian error message]
--------

Any clue on what is going on, and how I can tell an application whose name/ref is calculated?

I don't know what's going on with your problem because I only answered the question about 'using terms from…' and avoid installing M$ products on my machines as much as possible so I don't have intimate knowledge of their scripting quirks. 

However, another avenue for you to explore is to try to open (i.e. 'activate') the exact application first: The following is just an example. To get the real path of the application, open up the /Applications folder and drag it into a Terminal window.  Then copy the path to your script (a trailing "/" in the name is optional).

set fpath to quoted form of "/Applications/Microsoft Office 2004/Microsoft Word.app"
do shell script "open " & fpath

Now the desired application should be frontmost and you do not have to require the name of the startup disk.


Philip Aker
echo email@hidden@nl | tr a-z@. p-za-o.@

Democracy: Two wolves and a sheep voting on lunch.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Targetting a specific Word version (From: Sjur Moshagen <email@hidden>)
 >Re: Targetting a specific Word version (From: email@hidden)
 >Re: Targetting a specific Word version (From: Sjur Moshagen <email@hidden>)
 >Re: Targetting a specific Word version (From: email@hidden)
 >Re: Targetting a specific Word version (From: Philip Aker <email@hidden>)
 >Re: Targetting a specific Word version (From: Sjur Moshagen <email@hidden>)

  • Prev by Date: Re: Create Incopy assignment
  • Next by Date: Re: Create Incopy assignment
  • Previous by thread: Re: Targetting a specific Word version
  • Next by thread: Re: Targetting a specific Word version
  • Index(es):
    • Date
    • Thread