lngCount = objFolder.Items.Count
lngRow = ActiveSheet.Cells(Rows.Count, 1).
End
(xlUp).Row
For
lngCur = 1
To
lngCount
Application.StatusBar =
"Lese Posteingang "
& _
Format(lngCur / lngCount,
"0%"
)
With
objFolder.Items(lngCur)
If
Format(.ReceivedTime,
"DD.MM.YYYY"
) = Format(
Date
,
"DD.MM.YYYY"
)
Then
If
.Subject = emailtitle
Then
lngRow = lngRow + 8
Cells(lngRow + 1, 1).Value = .Subject
Cells(lngRow + 2, 1).Value = .ReceivedTime
Cells(lngRow + 3, 1).Value = .SenderName
Cells(lngRow + 4, 1).Value = .SenderEmailAddress
Cells(lngRow + 5, 1).Value = .Body
Cells(lngRow + 6, 1).Value = .Attachments.Count
If
.Attachments.Count > 0
Then
For
lngIndex = 1
To
.Attachments.Count
Debug.Print strPath & .Attachments.Item(lngIndex).Filename
.Attachments.Item(lngIndex).SaveAsFile v_path1 & .Attachments.Item(lngIndex).Filename
Next
End
If
.UnRead =
False
End
If
End
If
End
With
Cells(lngRow + 2, 1).Offset(0, 1).
Select
ActiveCell.FormulaR1C1 =
"= DATE(YEAR(RC[-1]),MONTH(RC[-1]),DAY(RC[-1]))"
Cells(lngRow, 1).
Select
Next