Get details of sent items with Access VBA

Status
Not open for further replies.

Fritz

New Member
Outlook version
Outlook 2010 64 bit
Email Account
POP3
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
 
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 slipstick.com

Debug.Print item.sento item.subject item.to

If Item.Attachments.Count > 0 Then
For Each oAtt In Item.Attachments
Debug.Print oAtt.Name
Next oAtt
end if
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
H Outlook 365 issue getting details from embedded files, crashing routine Outlook VBA and Custom Forms 0
F VBA to move email from Non Default folder to Sub folders as per details given in excel file Outlook VBA and Custom Forms 11
A Day view - print appointment details Using Outlook 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 Using Outlook 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? Using Outlook 0
B modifying print template for printing out appointment details Using Outlook 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
L Error when exporting Sent Mail to Excel Outlook VBA and Custom Forms 6
X Run macro automatically when a mail appears in the sent folder Using Outlook 5
P Search folder: all emails sent to or from a domain Using Outlook 1
L Help: set flag for sent mail to check if received an answer Outlook VBA and Custom Forms 2
S Paperclip icon shows without attachment in email under Sent folder Using Outlook 0
S Sent e-mails roll back to previous draft state Using Outlook.com accounts in Outlook 3
icacream Outlook 2021 Win 10 - Nothing goes in my Drafts or Sent items folders ! Using Outlook 1
S Adding a recipient's column to Sent folder in Outlook 2010 Outlook VBA and Custom Forms 1
J Quick steps delete original email and move reply/sent email to folder Using Outlook 2
B IMAP server rejects sent email - cannot deliver messages Using Outlook 2
S How to find emails that I sent that have not received a reply? Using Outlook 7
M Extract "Date sent" from emails (saved to folder using drag and drop) Outlook VBA and Custom Forms 1
R Sent emails show iCloud mail account not the alias Using Outlook 2
L Images not displaying in emails sent to self Using Outlook 2
S Outlook 2016 A Shortcut to recall and delete and sent message. Using Outlook 1
J Names in sent items suddenly show as Bob Smith (bobsmith@sample.com) Using Outlook 3
M Messages Intermittently Dont Arrive In Sent Items After Sending Successfully Using Outlook 4
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

Similar threads

Back
Top