Q:

Calculating the number of times a mail is forwarded or replied to

I want to get all the subjects that are included in a chain mail. 
Scenario: We receive an email (suppose 10 people receive it) then out of those people someone replies to all and then another person replies to all. So at the end or the last email that I receive will have 3 mails in combined in one single mail. Parent mail, then two replies. What I want is to get the information that who replied to that email 1st and then second and their replies. Or if we can break that email into 3 separate emails. Please suggest where to start with.

A:

I have found a way of doing it by passing the email body into an array after splitting it by tab and then searching "Subject:" in that by passing it into a loop. Code I have used is Below. 
This code 1st picks up the selected mail and then passes it. 
Set olapp = GetObject(, "Outlook.Application")
Set olmail = olapp.ActiveExplorer.Selection(1)

msg_body = Split(olmail.Body, Chr(13))

MsgBox UBound(msg_body)

For i = 0 To UBound(msg_body)

If InStr(msg_body(i), "Subject:") <> 0 Then
MsgBox msg_body(i)
End If
Next i

You can print or use the count of those to identify how many mails are there in the chain.

