• 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
Moving Text from TextEdit to Word
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Moving Text from TextEdit to Word


  • Subject: Moving Text from TextEdit to Word
  • From: Jeffrey Berman <email@hidden>
  • Date: Mon, 21 Oct 2002 22:03:15 -0500

I'm having difficulty in what I thought would be a simple process of copying
text of a TextEdit document into a document in Microsoft Word. For example,
if the text of the front document of TextEdit is "boo" and Word has an open
document window, the following syntax:

tell application "TextEdit" to get text of document 1
tell application "Microsoft Word" to set text of document 1 to result

produces the error message:

Microsoft Word got an error: Can't set every text of document 1 to "boo".

I noticed that the result returned from TextEdit had a class of Unicode
text. But the same error message occurs even if I coerce the text from
TextEdit to a string as in:

tell application "TextEdit" to get text of document 1 as string
tell application "Microsoft Word" to set text of document 1 to result

On the other hand, if I have text in a BBEdit document (where the text
property is to the window instead of the document), the following syntax:

tell application "BBEdit" to get text of window 1
tell application "Microsoft Word" to set text of document 1 to result

works without error.

Anyone know what I need to change in my commands to transfer text from a
TextEdit document to Microsoft Word?

-Jeffrey Berman
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Moving Text from TextEdit to Word
      • From: Michael Terry <email@hidden>
  • Prev by Date: Virex scan folder script package
  • Next by Date: Re: Quark 4 and Group
  • Previous by thread: Virex scan folder script package
  • Next by thread: Re: Moving Text from TextEdit to Word
  • Index(es):
    • Date
    • Thread