• 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
Re: Strange Word behaviour
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strange Word behaviour


  • Subject: Re: Strange Word behaviour
  • From: Christopher Stone <email@hidden>
  • Date: Tue, 19 Feb 2019 03:53:55 -0600

On 02/16/2019, at 17:24, David Crowe <email@hidden
<mailto:email@hidden>> wrote:
> Am I doing something wrong, or is Word (Word 2011) just broken?


Hey David,

Well – Microsoft Word is Microsoft Word...  :)

If you know your document exists you could do something like this:

----------------------------------------------------------------

tell application "Microsoft Word"
    set theDoc to first item of (get documents whose name is "Zebra.docx")
end tell

----------------------------------------------------------------

But a better general strategy would be to do something like this:

----------------------------------------------------------------

tell application "Microsoft Word"

    set docList to documents whose name is "Zebra.docx"

    if length of docList = 1 then
        set theDoc to item 1 of docList
    end if

end tell

----------------------------------------------------------------

Don't forget that saved Word documents include the file suffix in the file name.

--
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:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Strange Word behaviour (From: David Crowe <email@hidden>)

  • Prev by Date: Re: Strange Word behaviour
  • Next by Date: Re: Strange Word behaviour
  • Previous by thread: Re: Strange Word behaviour
  • Next by thread: Re: Strange Word behaviour
  • Index(es):
    • Date
    • Thread