Re: scripting Word top copy text - should be simple, but ain't
Re: scripting Word top copy text - should be simple, but ain't
- Subject: Re: scripting Word top copy text - should be simple, but ain't
- From: "Charles Arthur, UKClimbing Editor" <email@hidden>
- Date: Wed, 26 Apr 2006 21:36:25 +0100
On Tue, 25 Apr 2006 18:41:59 -0700 Michelle Steiner
<email@hidden> wrote:
>On Apr 25, 2006, at 12:15 PM, Charles Arthur, UKClimbing Editor wrote:
>
>>> tell application "Microsoft Word"
>>> content of text object of document "Hello.doc" -- or document 1, or
>>> document whatever
>>> end tell
>>
>> Except: how do you work out what document you've opened?
>
>Either by name, or by the fact that the most recently opened document
>is window 1 or document 1.
Michelle and Paul B breach the tape jointly, the triumphant finishers in
the relay race.. The script
--
set thefile to choose file
tell application "Microsoft Word"
open thefile
set theText to content of text object of active document
close document 1
end tell
theText
--
is perfect. Thanks to all. (Though I do, on Paul B's advice, now have the
Applescript stuff for Word 2004.)
best
Charles
--
http://www.ukclimbing.com : 1,000+ British crags, 350+ British climbing walls
- searchable by distance rock type, etc, with 5-day weather forecasts for
every one - plus maps, articles, news, and the New Routes database. There's
even a cool shop attached...
_______________________________________________
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