• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
MS Word: "open file" vs. "open file name" vs. ???
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

MS Word: "open file" vs. "open file name" vs. ???


  • Subject: MS Word: "open file" vs. "open file name" vs. ???
  • From: Michael Grant <email@hidden>
  • Date: Thu, 16 Nov 2017 09:39:22 -0600

A few versions ago, I used to have a nice script that would look at the
Finder selection of MS Word files, do a quick page/line/word/character
count, of each one, display the totals, and offer to save the result in a
text file. 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.

If I:

tell application "Microsoft Word" to open file someFile

then I often, but not always, get a "file could not be found" error and the
script fails.


On the other hand, if I

tell application "Microsoft Word" to open file name someFile


then I often, but not always, have to manually "grant access" to each file
as the script is executing, which sorta defeats the purpose of automation.



Is there some third way of getting Word to just open the dang file and get
on with it?


Thanks,

Michael



--
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

  • Follow-Ups:
    • Re: MS Word: "open file" vs. "open file name" vs. ???
      • From: Christopher Stone <email@hidden>
  • Prev by Date: Re: High Sierra/script menus/ASObjC
  • Next by Date: Re: MS Word: "open file" vs. "open file name" vs. ???
  • Previous by thread: Re: Deference number
  • Next by thread: Re: MS Word: "open file" vs. "open file name" vs. ???
  • Index(es):
    • Date
    • Thread