To scrape "Certified Mail" permissions from Outlook using VBA, use the following concise script:
This script identifies emails marked as certified mail by checking the message class.Sub ScrapeCertifiedMail() Dim OutlookApp As Object Dim Inbox As Object Dim Mail As Object Dim Items As Object Dim i As Integer ' Initialize Outlook objects Set OutlookApp = CreateObject("Outlook.Application") Set Inbox = OutlookApp.GetNamespace("MAPI").GetDefaultFolder(6) Set Items = Inbox.Items ' Loop through emails For i = 1 To Items.Count Set Mail = Items(i) ' Identify certified mail If Mail.MessageClass = "IPM.Note.SMIME" Then Debug.Print "Certified Mail: " & Mail.Subject End If Next i End Sub




Reply With Quote