Skip to content

Instantly share code, notes, and snippets.

@guptesp
guptesp / Save Attachments to Disk.scptd
Last active May 19, 2022 18:37
Applescript to save attachments from Outlook to disk
-- Save this file to ~/Library/Application Support/Microsoft/Office/Outlook Script Menu Items folder on your ma
tell application "Microsoft Outlook"
set totalSize to 0
set msgs to current messages
set myDocumentFolder to POSIX path of (path to documents folder as string)
set myAttachmentsFolder to myDocumentFolder & "Attachments"
tell application "Finder"
if not (exists myAttachmentsFolder) then
#make new folder at myDocumentFolder with properties {name:"Attachments"}
do shell script "mkdir -p " & quoted form of myAttachmentsFolder