The code below saves the attachments [to "My Documents" folder] of "selected" emails in Outlook.
Can you please advise how to change the location of the sFolderPath = objWSCript.specialfolders(16)
to a "New Folder" folder on C drive ?
Option Explicit
Sub SaveAttchFiles()
Dim olMail As MailItem
Dim olAtchs As Attachments
Dim olSelection As Selection
Dim iCount As Long, i As Long
Dim sFolderPath As String, sFilePath As String, sDeletedFiles As String
Dim objWSCript As Object
On Error Resume Next
Set objWSCript = CreateObject("WSCript.Shell")
sFolderPath = objWSCript.specialfolders(16)
Set olSelection = ActiveExplorer.Selection
sFolderPath = sFolderPath & "\New Folder\"
For Each olMail In olSelection
Set olAtchs = olMail.Attachments
iCount = olAtchs.Count
sDeletedFiles = ""
If iCount > 0 Then
For i = iCount To 1 Step -1
sFilePath = sFolderPath & olAtchs.Item(i).FileName
olAtchs.Item(i).SaveAsFile sFilePath
Next i
End If
Next olMail
Door:
Set objWSCript = Nothing
Set olAtchs = Nothing
Set olSelection = Nothing
End Sub