One member (thank you Bruce) has helped me creating an AppleScript for Mail (see under), that extracts PDF files from Mail, and copies them to a directory on the desktop called Incoming PDF with a unique filename.
The name comes as example: Scan-177202-2.pdf
Is there a way that the name of the created .PDF file(s) includes the date/time of the received e-mail ?
YYYYMMDDHHmmss-MessageID-ItemID.pdf where YYYYMMDDHHmmss is the arrival time of the e-mail in my mailbox ?
Thanks in advance.
--------------This is the Script---------------
set outputPath to (path to desktop as Unicode text) & “Incoming PDF:”
set theseMessages to |SelectedMessages| of theData
tell application id “com.apple.mail”
repeat with thisMessage in theseMessages
repeat with thisItem in mail attachments of thisMessage
if MIME type of thisItem is “application/pdf” then
save thisItem in (outputPath & “Scan-” & id of thisMessage & “-” & id of thisItem & “.pdf”)