Moving Text from TextEdit to Word
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.