| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
Microsoft Word AppleScript syntax remains a very frustrating guessing job ...You haven't said which version of Microsoft Word you are using. Versions before 2004 don't work right. The dictionary was completely re-implemented in 2004.
Take this simple script :I have no trouble doing this in Word 2004 – I saved to a different drive and it worked fine, up until the 'save' command. 'close' is a different matter – it's trying to close a different document and throwing up a dialog. Evidently the front window and the front document are not the same. 'close front document' works fine.
set newPath to (choose file name) as Unicode text -- choose a file name and where you want to save it
tell application "Microsoft Word"
activate
open file "anyDisk:anyFolder1:anyFolder2:myFile.doc" -- open any specified Word document anywhere
save front document in newPath -- try to save it where you want, with the name you want
close front window
end tell
The save command works fine as long as the newPath is anywhere on a partition of the system disk
It does not work if newPath is on a partition of another disk, or on a network disk, with the standard message :
"Microsoft Word got an error: document 1 doesn't understand the save message"
If you are in Word X you might need to use 'do Visual Basic'.
The problem occurs with OS 10.3.9 and 10.4.1
Permissions appear to be correct.
I even tried with read and write permissions for anybody (me, owner, group and others) all along the paths.
What is the magic needed to make it work in all cases ?
What is the correct syntax to name a document, and "save in ..." or "save as ..." this document anywhere we want ?
Should it be done with a do VisualBasic command ? with which syntax ?
How can Microsoft Word AppleScript usage be expanded, when it is impossible (or so difficult) to perform the most elementary of basics tasks :
naming a document, and saving it where we want ?
Any suggestion, solution or comments deeply appreciated.
_______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/applescript-users/email@hidden This email sent to email@hidden
| References: | |
| >Microsoft Word 2004 - Saving a document in a specified folder on a 2nd local disk or on a remote disk (From: Jacques Ravanat <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.