View Single Post
  #2  
Old December 4th 07, 10:03 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default reading message body line by line in VBA

Use Split on vbCRLF if it's plain text.

Dim aryLines() As String

aryLines = Split(strBody, vbCRLF)

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Mark VII" wrote in message
...
Greetings --

I need to read the body of an email message one line at a time, much as
you
would do with Line Input when reading a text file. Have code working that
opens an email item, and I can read the MailItem.Body into a string
variable.
In my situation (long story), it would be easier if I could read the body
as
a series of individual lines of text.

Any suggestions? TIA...

Mark



Ads