If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
Extract several lines of email messages starting from the end
Hi everyone,
I was hoping that someone would give me an idea how to accomplish this. I would like to pull out say the last 5 lines of all messages in my Inbox folder and write them all to a text file. I was thinking about creating a function and set a Position variable to the end of message, but no success. I can get the first couple lines with the below function. But how can I write my code to get the last 5 lines of the messages. Thnx in advance for your help. Private Function GetPosition(sBody As String) As Long Dim p As Long Dim position As Long position = 1 For p = 1 To 5 position = InStr(position, sBody, vbCrLf) position = pos + 1 Next GetPosition = position End Function |
Ads |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Attached .pdf end up as embedded garbage in email body | [email protected] | Outlook - General Queries | 6 | March 20th 06 02:59 PM |
Why do I have split lines in email? | Beemer | Outlook - General Queries | 2 | March 13th 06 07:24 AM |
VBscript to pull the first 3 lines out of Outlook email messages | scriptnewbie | Outlook and VBA | 3 | February 18th 06 09:48 AM |
Why do all of my contact email address have SMTP at the end? | Al S. | Outlook - Using Contacts | 1 | February 7th 06 03:32 PM |
How do I extract and use the info fields from "form mail" email to | Sean | Outlook - Using Forms | 1 | January 31st 06 11:53 PM |