Hoping someone can help. I currently have a outlook script that basically extracts my attachments and saves it to a specific folder. The script works fine, but instead of having the Now() date being appended to the file name when it is saved, I want it to append the Date Modified. I have surfed the net and cant seem to find anything. Hoping someone can help modify the logic below to do this. Thanks for your time in advance. - Ciru
Public Sub saveAttachtoDisk(itm As Outlook.MailItem)
Dim objAtt As Outlook.Attachment
Dim saveFolder As String
dateFormat = Format(Now, "yyyy-mm-dd")
saveFolder = "C:\Desktop\Test999"
For Each objAtt In itm.Attachments
objAtt.SaveAsFile saveFolder & "\" & dateFormat & " " & objAtt.DisplayName
Set objAtt = Nothing
Next
End Sub
Public Sub saveAttachtoDisk(itm As Outlook.MailItem)
Dim objAtt As Outlook.Attachment
Dim saveFolder As String
dateFormat = Format(Now, "yyyy-mm-dd")
saveFolder = "C:\Desktop\Test999"
For Each objAtt In itm.Attachments
objAtt.SaveAsFile saveFolder & "\" & dateFormat & " " & objAtt.DisplayName
Set objAtt = Nothing
Next
End Sub