Re: MS Word: "open file" vs. "open file name" vs. ???
Re: MS Word: "open file" vs. "open file name" vs. ???
- Subject: Re: MS Word: "open file" vs. "open file name" vs. ???
- From: Michael Grant <email@hidden>
- Date: Wed, 22 Nov 2017 22:06:41 -0600
With your code Word puts up a "This file could not be found" error dialog.
Currently running Word 2016, i.e. 15.40 (171108) on High Sierra 10.13.1. I
was also definitely having problems scripting Word before upgrading to HS,
I think from the time I installed Office 2016.
Thanks,
Michael
On Thu, Nov 16, 2017 at 11:35 PM, Christopher Stone <
email@hidden> wrote:
> On 11/16/2017, at 09:39, Michael Grant <email@hidden> wrote:
>
> Now I keep going back and forth between two commands to open the files,
> and each one (often but not always) fails in a different way.
>
> ------------------------------
>
> Hey Michael,
>
> Well, that sucks.
>
> Try this, and see if it works:
>
> ------------------------------------------------------------
> ------------------
> *tell* *application* "Finder"
> *set* finderSelectionList *to* selection *as* *alias list*
> *if* length *of* finderSelectionList = 0 *then* *error* "No files
> were selected in the Finder!"
> *end* *tell*
>
> *tell* *application* "Microsoft Word"
> *repeat* *with* theFile *in* finderSelectionList
> *open* theFile
> *end* *repeat*
> *end* *tell*
> ------------------------------------------------------------
> ------------------
>
> And for the record — what versions of macOS and Microsoft Word are you
> using?
>
> --
> Best Regards,
> Chris
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> users/email@hidden
> Archives: http://lists.apple.com/archives/applescript-users
>
> This email sent to email@hidden
>
>
--
There's really no such thing as translating. It's all a scam. We basically
just make stuff up and try to make it sound plausible.
_______________________________________________
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