• 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: scripting Word top copy text - should be simple, but ain't
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Mark todo as complete
  • Next by Date: Re: scripting Word top copy text - should be simple, but ain't
  • Previous by thread: Re: scripting Word top copy text - should be simple, but ain't
  • Next by thread: Re: scripting Word top copy text - should be simple, but ain't
  • Index(es):
    • Date
    • Thread