Excel VBA how to identify encrypt mails in outlook 365

kashif.special2005

Active Member
Joined
Oct 26, 2009
Messages
443
Hi All,

I hope all of you are doing great and staying safe.

I have a task in Outlook through Excel VBA, I want to identify encrypted mails in a folder in outlook365 and if that mail is encrypted then skip/move (another folder) this mail and go to next mail, the problem is that there is 2 types of encrypted mails I am receiving in that folder.

1st Encrypted Mails: This type of mails I can easily identify with the property "MessageClass" and see that if it is "IPM.Note.SMIME" then ignore this mail, however I am not able to move this mail from this folder to another folder, the VBA is giving an error message when I am trying to move this type of encrypted mail.

2nd Encrypted Mails: This type of mails is showing a "Lock" icon on the mail and when I am fetching the value of the property "MessageClass" it is giving "IPM.Note" however this mail is an encrypted mail, so my problem is how can I identify this kind of encrypted mails.

Thanks in advance for all of your support.

Thanks
Kashif
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

Forum statistics

Threads
1,214,943
Messages
6,122,380
Members
449,080
Latest member
Armadillos

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top