• 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: Getting Email Content in Outlook 2011
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting Email Content in Outlook 2011


  • Subject: Re: Getting Email Content in Outlook 2011
  • From: Dave <email@hidden>
  • Date: Fri, 24 Apr 2015 12:44:59 +0100

Hi Michael,

That’s work really well, thanks a lot.

So, each line is a paragraph and a line is a character?

e.g.

With:

Hello World!
Goodbye World!

as the content, then:

set myContent to the plain text content of item 1 of myMessageList
set myLine to line 1 of myContent				--Gets the first char - “H”
set myLine to paragraph 1 of myContent		--Gets the first line - “Hello World!”

What does char 1 do?

All the Best
Dave

> On 24 Apr 2015, at 10:42, Schmidt, Michael <email@hidden> wrote:
>
> 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


 _______________________________________________
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


References: 
 >Getting Email Content in Outlook 2011 (From: Dave <email@hidden>)
 >Re: Getting Email Content in Outlook 2011 (From: "Schmidt, Michael" <email@hidden>)

  • Prev by Date: Re: Getting Email Content in Outlook 2011
  • Next by Date: Re: Scripting Terminal ?
  • Previous by thread: Re: Getting Email Content in Outlook 2011
  • Next by thread: Can't get static text
  • Index(es):
    • Date
    • Thread