timhood
8 years agoLevel 0
Outlook VBA to delete e-mail containing Enterprise Vault shortcut
I have built an Outlook VBA macro to delete items matching specific criteria. It works well for normal e-mails, however, if the e-mail contains an Enterprise Vault shortcut, I first get prompted, "You have chosen to delete one or more Enterprise Vault shortcuts". I'd like to eliminate or manage that prompt. However, the bigger issue is that whether I answer "Delete Shortcuts" or "Delete Both", I get a runtime error 287, "Application-defined or Object-defined error."
I can identify the shortcuts with MessageClass = "IPM.Note.EnterpriseVault.Shortcut", however, I don't know how to deal with them to prevent the error. If I had to use VBA code to restore the shortcut, that would be acceptable.