PDA

View Full Version : Scrape "Certified Mail" Permission from Outlook using VBA



KM88
10-05-2020, 08:54 AM
Hi all, having a terrible time trying to figure this one out. When you send an email in Outlook, if you go under permissions and send it with certified mail, it will send to the recipient and display a little blurb about how it's certified mail along the top of the email.

I need to scrape emails using VBA and record ones that are certified mail. This is what I have so far. I've tried Multipartsigned and other variations of message classes but nothing has worked so far, I'm hoping someone can help me out? Much appreciated for any ideas!

Set OutlookSetFolder = OutlookSetNameSpace.GetDefaultFolder(6) ' 6 for Inbox folder

Set objAllMails= OutlookSetFolder.Items

MailProperty="'IPM.Note.SMIME'"

MailPropertyValue= "John Smith"

filter = "[MessageClass] = " & MailProperty & " AND [From] = '" & MailPropertyValue & "'"

Set ObjFilteredMails=objAllMails.Restrict(filter)

macropod
10-05-2020, 07:49 PM
Cross-posted at: https://www.tek-tips.com/viewthread.cfm?qid=1806280
Please read VBA Express' policy on Cross-Posting in Rule 3: http://www.vbaexpress.com/forum/faq.php?faq=new_faq_item#faq_new_faq_item3

KM88
10-06-2020, 06:09 AM
Thank you for letting me know, first time posting anywhere, will report the other post to be removed.