Re: Targetting a specific Word version
Re: Targetting a specific Word version
- Subject: Re: Targetting a specific Word version
- From: Sjur Moshagen <email@hidden>
- Date: Thu, 5 Jun 2008 08:19:10 +0300
Thanks for the follow-up.
Den 30. mai. 2008 kl. 15.37 skrev Robert Poland:
Sjur,
This works for me;
set HDname to (path to startup disk as text)
set Word2004 to HDname & "Applications:Microsoft Office
2004:Microsoft Word"
-- using terms from application Word2004
tell application Word2004
set MSWordVersion2004 to version
end tell
end
display dialog "MSWord 2004 version:" & MSWordVersion2004 & return &
return & Word2004
It turns out that this variant works for me as well, with the crucial
difference from my previous version being in this line:
set MSWordVersion2004 to application version
^^^^^^^^^^^
vs
set MSWordVersion2004 to version
As long as the application being told is directly referenced in a
string, 'application version' is interpreted as a property from the
Microsoft Word suite, and it works fine. But for some reason, when the
application is referenced in a variable, the property isn't recognised
as coming from the MSWord suit anymore, and it fails. The property
'version' belongs to the standard suite in the MSWord dictionary, and
works in both cases.
A small issue is that 'version' returns the correct version string for
MS Word 2008, but it returns the creation date in abbreviated form for
Word 2004 (and the creation date is different for the different
updates of Word 2004). But that should be easy to work around.
Thanks for the help!
Best regards,
Sjur
_______________________________________________
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