Bounced Email List Maker

You may want to get a list of all bounced emails from Outlook. This code should help you get started:

Dim outOutlook As New Outlook.Application
Dim outNamespace As Outlook.NameSpace
Dim myInbox As Outlook.MAPIFolder
Dim outItems As Outlook.Items
Dim outItem As Object
 
 
Set outNamespace = outOutlook.GetNamespace("MAPI")
Set myInbox = outNamespace.GetDefaultFolder(olFolderInbox)
 
Set outItems = myInbox.Items
 
DoCmd.Hourglass True
 
'Retrieve Failed Emails
For Each outItem In outItems
  If InStr(outItem.Subject, "Delivery Status Notification (Failure)") > 0 Then
    Debug.Print outItem.Subject
  End If
Next
 
DoCmd.Hourglass False
 
Set outOutlook = Nothing
Set outNamespace = Nothing
Set outItem = Nothing
https://bytes.com/topic/access/answers/954203-retrieve-list-bounced-email-addresses-outlook-into-access