I have this piece of code, it works on one computer Outlook 2010 64bit but does not work on another machine running 32bit. I do not think this has anything to do with 32bit/64 but just want to mention it in-case.
I have tried everything, disable macro, turning Outlook inside out and cannot get this code to work.
Maybe a second eye will find something I am missing:
Sub saveAttachtoDisk(itm As Outlook.MailItem)
Dim objAtt As Outlook.Attachment
Dim saveFolder As String
Dim dateFormat
dateFormat = Strings.Format(Now(), "mm_dd_yyyy_HH_MM_SS_AMPM")
saveFolder = "C:\Users\Jarvis\Desktop\Test"
For Each objAtt In itm.Attachments
objAtt.SaveAsFile saveFolder & "\" & "My_Data_" & dateFormat & ".csv"
Set objAtt = Nothing
Next
End Sub
Thanks everyone!
Based on our chat, it seems the solution was to: