Re: Microsoft Word 2004 - Saving a document in a specified folder on a 2nd local disk or on a remote disk
Re: Microsoft Word 2004 - Saving a document in a specified folder on a 2nd local disk or on a remote disk
- Subject: Re: Microsoft Word 2004 - Saving a document in a specified folder on a 2nd local disk or on a remote disk
- From: Paul Berkowitz <email@hidden>
- Date: Tue, 28 Jun 2005 16:41:56 -0700
- Thread-topic: Microsoft Word 2004 - Saving a document in a specified folder on a 2nd local disk or on a remote disk
Title: Re: Microsoft Word 2004 - Saving a document in a specified folder on a 2nd local disk or on a remote disk
On 6/28/05 3:52 PM, "Jacques Ravanat" <email@hidden> wrote:
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 :
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"
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.
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 ?
If you are in Word X you might need to use 'do Visual Basic'.
Even in Word 2004, notice that there is a 'save as' command in the Microsoft Word Suite that gives a lot more versatility. So if there's a problem with 'save' in Standard Suite (and I can imagine that there might be, since the document is already saved in a different file path), 'save as' might work better. The corresponding command for Word X would be 'do Visual Basic "SaveAs..."' but you'd need to study up on the VBA syntax for the arguments (parameters).
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.
Well, I'm not clear on why I can do it here, with your syntax, and you can't. Are you in Word 2004?
--
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