To move encrypted emails, use the Copy and Delete methods instead of Move. Here’s a quick code example:
Replace "YourTargetFolder" with your actual target folder name.Sub MoveEncryptedEmails() Dim sourceFolder As Outlook.MAPIFolder Dim targetFolder As Outlook.MAPIFolder Dim item As Object Set sourceFolder = Application.Session.GetDefaultFolder(olFolderInbox) Set targetFolder = Application.Session.Folders("YourTargetFolder") For Each item In sourceFolder.Items If item.Class = olMail And item.PropertyAccessor.GetProperty("http://schemas.microsoft.com/ _ mapi/proptag/0x7D01001E") = "IPM.Note.SMIME.MultipartSigned" Then item.Copy targetFolder item.Delete End If Next End Sub




Reply With Quote