Extracting attachments from all emails in an Outlook folder

I have no experience at all with AppleScript but I’m wondering if there is a way to do this…

I want to extract all the attachments from every email contained in a folder in Outlook, and save them to a folder on my Mac. The PowerShell script below works on my work PC and does exactly what I want. When it runs, Outlook asks me to select a folder and then the attachments from every email in that folder are saved to a folder called Attachments on my Windows desktop. But is this possible on my Mac?

Add-Type -assembly "Microsoft.Office.Interop.Outlook"

$Outlook = New-Object -ComObject Outlook.Application

foreach ($message in $Outlook.GetNameSpace("MAPI").pickfolder().Items) 
{
   write-host $message.Subject

   foreach ($att in $message.Attachments)
   {
       write-host "Attachment: " $att.filename
       $att.saveasfile( (Join-Path "C:\Users\adrian.clark\Desktop\Attachments\" $att.FileName ))
   }
   
}

Not sure if this will help with historic files, but If you are using Microsoft 365 I think that there is some functionality built in using Microsoft Power Automate (it was called Flow) that will allow attachments to be automatically saved into OneDrive (or elsewhere) as they arrive.

and

The best way to extract attachments from all emails in an Outlook folder with the help of ToolsBaer Outlook Attachment Extractor Tool is one of the finest solutions to extract all attachments from all emails which is saved in Outlook PST and OST files. Through this tool, users can extract emails, contacts, calendars, and attachments from PDF, XLS, PNG, JPG, and Doc formats. Users can operate this tool to connect with any version of Outlook files like MS Outlook 2021, 2019, 2016, 2013, 2010, 2007, 2003, etc. This is the best solution for all Outlook technical and non-technical users because it has simple graphic user interfaces so that users can operate this tool without technical solutions.

You didn’t actually provide a link, but I tracked it down from a very simiarly worded response elsewhere online - maybe by you (different name)? As I had suspected, this does not appear to be a viable solution here.

First and foremost the user is on a Mac and the suggested tool is Windows software. Aafter spending $49 USD (presumably + taxes)the user would then have to run at least it under Wine or Parallels or in a VM.

Yes, the user has a PC, but they also have a Powershell script that works on their PC already and does what they need for zero cost.

The webaite for that tool also needs a bit of work - various spelling mistakes, links that go to the wrong place, no product screenshots, etc. Not the most professional look.

“Best” and “Simplest”, and for “all” users - have you really tried them all and know everyone’s requirements?

It looks to have batch automation, but no automation hooks. It is also Windows only, and the request in this topic is explicitly seeking a solution for macOS.

It sounds to me like it doesn’t match any criteria set out in this topic, so I would therefore assert it isn’t the best, simplest solution for at least one user and most likely many many more for the extraction being requested.