Error running code on share mail box
Hi,
I am using the below code to print the attachments of selected e-mails on any folder in outlook. But when I am running this on a local Inbox folder this code is working pretty much in the expected manner, But unfortunately my requirement is to select the mails in a Shared Mailbox and print the attachments. I am experiencing error
Run-time error '-21477221233 (8004010f)': Method 'Attachments' of object 'MailItem' failed.
The same was happening for me when I am using code in KB522 on shared mailbox with some modification. Ref

thread KB522 RuntimeError in TargetFolderItems_ItemAdd )
Can you please let me know what to change in code in order to get the below code work for Shared Mail box?
Thanks in advance