->[O2007] Parsing each line of a MailItem HTMLBody?

S

Steve JORDI

Is there a way to get each line of a HTMLBody from a MailItem?

I have to get each HTML source line and check them against some
references to alter them.

I'd like to be able to do loop into something like:
get line
replace(line, search, replace)
next line

etc...

Any way to do this?

Thanks for any light! :)


Sincerely,
Steve JORDI

(Remove the K_I_L_LSPAM from my email address)
 
K

Ken Slovak - [MVP - Outlook]

HTMLBody is text (a string). You can use any string functions to do what you
want.

You can break any lines into an array you can parse one member at a time
using a Split() function on "<br>" or "<p>" or whatever line or paragraph
break characters you want.

Since you don't mention your Outlook version or what language you're using
it's impossible to me more specific.
 
S

Steve JORDI

Hi Ken,
thanks for your help.

Ok, I'll check this. I had a hunch it would be string operations.
Just come from Excel VBA programming and of course handling
information in Excel and Outlook is different :)


Sincerely,
Steve JORDI

(Remove the K_I_L_LSPAM from my email address)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top