The modified subroutine below will parse your subject line and also populate
columns with the sender's name and sender's email address. However, because
of security, when you run the routine you will get a pop-up box alerting you
that a program is attempting to extract address information and you will
need to approve this action for a selectable time period.
______________________________________________
Sub FetchSubjectLines()
Const olFldrInbox = 6
Dim R As Integer
' Determine row of first available cell in "A:A"
R = Range("A65536").End(xlUp).Row + 1
'Get folder object for subfolder of inbox
Set objOL = CreateObject("Outlook.Application")
Set objNS = objOL.GetNamespace("MAPI")
Set objFolder = objNS.GetDefaultFolder(olFldrInbox)
Set myFldr = objFolder.Folders("Jokes")
'Grab subject lines from messages in jokes folder less than three days old
For Each msgItem In myFldr.Items
If DateDiff("d", msgItem.ReceivedTime, Now) < 5 Then
If InStr(msgItem.Subject, "/") > 1 Then
subArray = Split(msgItem.Subject, "/")
For s = 0 To UBound(subArray)
Cells(R, s + 1).Value = Trim(subArray(s))
Next s
Cells(R, s + 1).Value = msgItem.SenderEmailAddress
Cells(R, s + 2).Value = msgItem.SenderName
R = R + 1
End If
End If
Next msgItem
Set objNS = Nothing
Set objOL = Nothing
End Sub
______________________________________________
Steve