Outlook property for DatetimeSent

L

Lars Brownie

With the test code beneath I'm able retrieve the SenderName of an
Outlookemail. This also works for Subject and Body. The only property I'm
still looking for is the datetime when the email was sent. I tried several
possibilities but no luck. Anyone an idea?
Thanks, Lars


Dim olApp As Outlook.Application
Dim olExp As Outlook.Explorer
Dim olSel As Outlook.Selection
Dim i

Set olApp = GetObject("", "Outlook.Application")
Set olExp = olApp.ActiveExplorer
Set olSel = olExp.Selection

MsgBox olSel.Item(1).SenderName
olSel.Item(1).SaveAs CurrentProject.Path & "\mail.txt", olTXT
Next
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top