Anyone remember that techniqe where you can move your scripts to new machines without having the script ask the user to locate an application the first time they run it?
-- Word should be runnning now! tell application "Finder" -- let's see... set appName to name of application file id "MSWD" end tell tell application "Microsoft Word" tell application appName close documents without saving if exists document "document1" then close document "document1" without saving end if end tell end tell
… gets you this event log
tell application "Finder" get name of application file id "MSWD" "Microsoft Word X v3" end tell tell application "Microsoft Word" close document "temp.txt" of application "Microsoft Word X v3" saving no "Microsoft Word got an error: Can't get document \"temp.txt\" of application \"Microsoft Word X v3\"."
Can anyone tell me how to word the “close document “document1” without saving” line so it doesn’t get interpreted as referring to “of Microsoft Word X v3”?
OX X 10.4, AS 1.10, Will run with multiple versions of word X
Browser: AS 1.10
Operating System: Mac OS X (10.4)