In reply to Richard White:
This is a very condensed snippit of some VBA I wrote to save attachments from all selected emails in Outlook. It might give you a starting point.
Running code in Outlook is not so straightforward as other office applications - for example, you will probably need to create a self-signed digital certificate to sign your project, otherwise it will not run after you close and reopen Outlook.
Public Sub RunActions()
Dim sFldr As String
Dim sExtn as string
Dim Item As Outlook.MailItem
Dim Atmt As Attachment
sFldr = "path" ' path to folder where you want to save"
sExtn = "ext" ' extension to search for
Dim objSelection As Outlook.Selection
Set objSelection = Application.ActiveExplorer.Selection
On Error GoTo errRunActions
For Each Item In objSelection
For Each Atmt In Item.Attachments
If GetExtension(Atmt.FileName) = sExtn then
Atmt.SaveAsFile sFldr & "" & Atmt.FileName
End If
Next
Next
On Error GoTo 0
Exit Sub
errRunActions:
MsgBox "Error occurred while saving attachments : " & vbCrLf & Err.Description, vbExclamation, "Saving attachments"
End Sub
Private Function GetExtension(f As String)
Dim a As Variant
GetExtension = ""
If InStr(f, ".") > 0 Then
a = Split(f, ".")
GetExtension = a(UBound(a))
End If
End Function
Post edited at 19:56