• 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
Styled text in Mail
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Styled text in Mail


  • Subject: Styled text in Mail
  • From: Irwin Poche <email@hidden>
  • Date: Sun, 10 Oct 2004 12:51:57 -0500


I'm trying to copy the content of one piece of mail to a new piece of mail. Whenever I do so the new mail looses its styles. For instance, if the original message has a word in red, the color is missing in the newly created email.

All my attempts give the same, non-styled result even though both messages are styled as evidenced by the presence of "Make Plain Text" in the Format menu.

The Mail dictionary lists
Class text: Rich (styled) text but not any other reference to another class of text.

Is it possible to extract styled text from an outgoing message?

Below is a test script and it's Event Log which creates a new outgoing message in which the word red isn't colored red as it was in the original message.

-Irwin

tell application "Mail"
set theID to outgoing message 1
properties of theID


set theContentStyled to content of theID as styled text
log class of theContentStyled
--==> (*string*)


set aMessage to make outgoing message with properties ¬
{true, theContentStyled}


set theContent to content of theID
log class of theContent
--==> (*Unicode text*)


set aMessage to make outgoing message with properties ¬
{true, theContent}


end tell
============================================================
tell application "Mail"
get outgoing message 1
outgoing message id 354155520
get properties of outgoing message id 354155520
{message signature:missing value, html content:missing value, true, subject:"", vcard path:missing value, outgoing message, sender:"
Irwin Poche <email@hidden>", content:"This word red is actually colored red.", id:354155520}
get content of outgoing message id 354155520
"
This word red is actually colored red."
(*string*)
make with properties {true, content:"
This word red is actually colored red."} new outgoing message
outgoing message id 95637376
get content of outgoing message id 354155520
"
This word red is actually colored red."
(*Unicode text*)
make with properties {true, content:"
This word red is actually colored red."} new outgoing message
outgoing message id 79938384
end tell
 _______________________________________________
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: Calling a script with a keyboard shortcut
  • Next by Date: Re: Regex substitute/replace function in Applescript?
  • Previous by thread: Calling a script with a keyboard shortcut
  • Next by thread: Warning: Script Editor File Destruction
  • Index(es):
    • Date
    • Thread