• 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: set the clipboard not available in in some apps (like Word)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: set the clipboard not available in in some apps (like Word)


  • Subject: Re: set the clipboard not available in in some apps (like Word)
  • From: Paul Berkowitz <email@hidden>
  • Date: Sun, 12 Dec 2004 14:21:48 -0800

On 12/12/04 2:04 PM, "Paul Berkowitz" <email@hidden> wrote:

>> I am willing to add a handler that treats Word as a special case, if I
>> know of some way to place a variable of class Unicode Text into the
>> selection of the front document in Word 2004. In other words, given
>> set theString to "Can you place me now" as Unicode Text
>> is there ANY way to get that into the selection of the front Word
>> document?
>
> Yes. Here's a workaround. Ask the user to click a checkbox or button if they
> intend to paste into Word (so as not to create unnecessary activity for
> other users). If so then add on (after
>
> set theString to "Can you paste me now ¥?" as Unicode text
> set the clipboard to theString
> )
>
> tell application "Microsoft Word"
>     set newDoc to make new document
>     set content of text object of newDoc to theString
>     set selection's selection end to ((end of content of newDoc's text
> object) - 1) -- extends selection to end
>     copy object selection
>     close newDoc saving no
> end tell
>
>
> Now you can paste it into Word.

Or if you want to replace the selection (or insert at the cursor) of the
front document by script, as you asked, then it's much easier and not
clunky:

set theString to "Can you paste me now ¥?" as Unicode text
tell application "Microsoft Word"
    set content of text object of selection to theString
end tell




--
Paul Berkowitz


 _______________________________________________
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

References: 
 >Re: set the clipboard not available in in some apps (like Word) (From: Paul Berkowitz <email@hidden>)

  • Prev by Date: Re: set the clipboard not available in in some apps (like Word)
  • Next by Date: multiple Airport configurations
  • Previous by thread: Re: set the clipboard not available in in some apps (like Word)
  • Next by thread: Re: set the clipboard not available in in some apps (like Word)
  • Index(es):
    • Date
    • Thread