Get details of sent items with Access VBA

Not open for further replies.


New Member
Outlook version
Outlook 2010 64 bit
Email Account
I have an access program that sends emails with Outlook.
I need to get details from each email that was sent today.
I I am looking for VBA code to do the following. From there on I can do the rest.

I want to say:
For each message in outlook.sentmail
TimeSent =
EmailAddress =
Subject =
AttachmentName =
Debug.Print TimeSent, EmailAddress, Subject, AttachmentName
Next message

Can you help me please

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
That's not hard. you need outlook's senton, to, subject - attachment name is from the attachment collection so it needs an extra line. I have samples of all both here and at

Debug.Print item.sento item.subject

If Item.Attachments.Count > 0 Then
For Each oAtt In Item.Attachments
Debug.Print oAtt.Name
Next oAtt
end if
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
A Day view - print appointment details Calendar Printing Assistant 1
I print calendar without subject and details Using Outlook 1
nathandavies Email Details to Excel & Save as .MSG on one macro - combination of 2 macros Outlook VBA and Custom Forms 3
N Export details to a excel spreadsheet using macros Using Outlook 0
Diane Poremsky VBA: Get All Contact Details New Articles 0
V move emails to windows folder and show sender details Using Outlook 7
P Outlook 2010 intermittently asking for my login details Using Outlook 12
J Can invitee edit details? Using Outlook 1
L Business Contact Mnager losing contact details BCM (Business Contact Manager) 1
V Extracting user-defined details from a public folder Outlook VBA and Custom Forms 2
S Requried a VBA Code to export Calander details to excel... Outlook VBA and Custom Forms 4
S Outlook Macro details Using Outlook 3
M details with the combo box Exchange Server Administration 3
B Birthday dates automatically (and improperly) placed in Birthday Details Using Outlook 2
R Surely you can print details/Body? Calendar Printing Assistant 0
B modifying print template for printing out appointment details Calendar Printing Assistant 2
R Need code to gather value of custom field on addressentry.details dialog box Using Outlook 3
D Accessing Global Address List details with VBA Outlook VBA and Custom Forms 1
V how to collect details from user, during installation of office addin? Outlook VBA and Custom Forms 1
N Incorporating user details from AD into an Outlook Form Outlook VBA and Custom Forms 4
P Contact Details from Appointment Item Outlook VBA and Custom Forms 1
S hide details of appointments in calendar Using Outlook 8
S Record eMail details in Outlook 2007 Outlook VBA and Custom Forms 5
Q Completed details on form don't show on reply Outlook VBA and Custom Forms 1
J Names in sent items suddenly show as Bob Smith ( Using Outlook 3
M Messages Intermittently Dont Arrive In Sent Items After Sending Successfully Using Outlook 2
D Outlook 2016 Outlook not saving Sent Items Using Outlook 4
A Is there an ID field you can use to pair a reply to the sent email? Outlook VBA and Custom Forms 4
T Changing Sent Items location in Outlook 2019 Using Outlook 0
S Outlook (2016 32bit; Gmail IMAP) - Save sent message to Outllook Folder Outlook VBA and Custom Forms 0
C VBA to prompt for Sent folder destination Outlook VBA and Custom Forms 3
MrMayor SENT mail not reloading to top?? Using Outlook 4
D Mail in Sent Items Gone Using Outlook 12
A calendar invites sent from Microsoft Outlook to Mac Outlook is not working Calendar Printing Assistant 2
Terry Sullivan E-Mails Sent Using a Group Box Result in 70 Kickbacks Using Outlook 5
GregS Outlook 2016 Sent Mail absent from Sent Mail or Sent Items Folders Using Outlook 4
P Outlook for Mac - emails are not sent out beginning last week Using Outlook 1
J Sent Items Folder NOT Showing Correct From Email Address Using Outlook 0
J Outlook Reply > From > Other Email Address... > Address Not Showing in Sent Items... From Email Outlook VBA and Custom Forms 0
T Column to display which email alias a message was sent to Outlook VBA and Custom Forms 6
GregS Outlook 2016 Sent Items vs Sent Messages Using Outlook 2
N Disable Auto Read Receipts sent after using Advanced Find Using Outlook 4
R Outlook for Mac - Advanced Search and Tracking Sent Emails Using Outlook 0
B Outlook - Mail from safe senders list being sent to Spam Folder Using Outlook 0
N Sent emails not reflected in all IMAP Folders Using Outlook 4
L Outlook/O365 "sent on behalf" behaviour Exchange Server Administration 1
M Sent mail not showing in Sent Items folder; but they can be found with Search Using Outlook 3
H Outlook 2016 sent over 30 copies of an e-mail with attachments Using Outlook 1
W Outlook 2010 some sent items marked unread now (was Ok before) Using Outlook 0
T Outlook converts sent email to txt attachments when sync Using Outlook 0

Similar threads