Re: Getting Email Content in Outlook 2011
Re: Getting Email Content in Outlook 2011
- Subject: Re: Getting Email Content in Outlook 2011
- From: "Schmidt, Michael" <email@hidden>
- Date: Fri, 24 Apr 2015 09:42:00 +0000
- Thread-topic: Getting Email Content in Outlook 2011
Hi, Dave,
try
set myContent to the plain text content of item 1 of myMessageList
instead. You then can access the lines by using „paragraphs of myContent“.
Cheers,
Michael
Am 24.04.15 11:33 schrieb "Dave" unter <email@hidden>:
>Hi All,
>
>I have the following script that is being run from a Cocoa Application:
>
>on run
> tell application id "com.microsoft.Outlook"
> activate
>
> set myMessageList to current messages
>
> set myContent to the content of item 1 of myMessageList
> end tell
>
> return myContent
>end run
>
>If I have an email message with two lines in it:
>
>Hello World!
>Goodbye World!
>
>Then I get this returned in “ myContent”:
>
>"<html><head></head><body style=\"word-wrap: break-word;
>-webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color:
>rgb(0, 0, 0); font-size: 14px; font-family: Calibri,
>sans-serif;\"><div>Hello World!</div><div><div>Goodbye
>World!</div></div><div><br></div></body></html>”
>
>However, I’d like it without any of the HTML crap in it and also in a
>line format so I can do things like:
>
>myFirstTextLine = line 1 of myContent
>mySecondTextLine = line 2 of myContent
>
>Is there a way of getting rid of it? I also may want to add a line at the
>start of the body, Is this possible?
>
>Basically I want to remove a lines when the email opens and add lines
>when it’s sent. I’ve got most of this working now, but can’t figure out
>how to add remove the lines when the text is in HTML format.
>
>Thanks a lot
>Dave
>
>
> _______________________________________________
>Do not post admin requests to the list. They will be ignored.
>AppleScript-Users mailing list (email@hidden)
>Help/Unsubscribe/Update your Subscription:
>@bauermedia.com
>Archives: http://lists.apple.com/archives/applescript-users
>
>This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden