Re: Strange Word behaviour
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