I found this code snippet on another site:
https://www.extendoffice.com/documents/outlook/3747-outlook-auto-download-save-attachments-to-folder.html
This works! Which is great. However I would like to modify this to only grab PDF files from the emails and prepend a date to the file name (yyyymmdd - original filename). I have zero programming knowledge. I have found a few different sites and have tried to modify but it just breaks the code and the script stops working. Any assistance would be appreciated.
Public Sub SaveAttachmentsToDisk(MIte
m As Outlook.MailItem)
Dim oAttachment As Outlook.Attachment
Dim sSaveFolder As String
sSaveFolder = "C:\Users\DT168\Documents\
outlook-at
tachments\
"
For Each oAttachment In MItem.Attachments
oAttachment.SaveAsFile sSaveFolder & oAttachment.DisplayName
Next
End Sub