I am trying to save attachments sent to a shared inbox to disk.
Public Sub CSD_SaveAttachmentsToDisk(MItem As Outlook.MailItem)
Dim oAttachment As Outlook.Attachment
Dim sSaveFolder As String
sSaveFolder = "C:\Users\user\Documents\"
For Each oAttachment In MItem.Attachments
Debug.Print ("saving...")
oAttachment.SaveAsFile sSaveFolder & oAttachment.DisplayName
Next oAttachment
End Sub
I'm using Outlook 2016, and have a rule which calls this script on all messages.
The messages aren't saved.