andyporter1975
New Member
- Joined
- Feb 3, 2014
- Messages
- 27
Hi,
I have the following macro set up to run in Outlook 2007. For 2 months it worked perfectly, then from the 1st January it stopped.
Public Sub saveAttachtoDisk(itm As Outlook.MailItem)
Dim objAtt As Outlook.attachment
Dim saveFolder As String
saveFolder = "D:\portera\Desktop\Attachments"
Dim dateFormat As String
dateFormat = Format(itm.ReceivedTime, "yyyy-mm-dd Hmm ")
For Each objAtt In itm.Attachments
objAtt.SaveAsFile saveFolder & "\" & dateFormat & objAtt.DisplayName
Next
End Sub
The code is inserted into ThisOutlookSession. Macros are enabled.
The macro no longer appears in the list of macros that are able to be run.
I have tried building other macros but they too don't appear in the run list.
Does anyone have any ideas?
Thanks in anticipation.
I have the following macro set up to run in Outlook 2007. For 2 months it worked perfectly, then from the 1st January it stopped.
Public Sub saveAttachtoDisk(itm As Outlook.MailItem)
Dim objAtt As Outlook.attachment
Dim saveFolder As String
saveFolder = "D:\portera\Desktop\Attachments"
Dim dateFormat As String
dateFormat = Format(itm.ReceivedTime, "yyyy-mm-dd Hmm ")
For Each objAtt In itm.Attachments
objAtt.SaveAsFile saveFolder & "\" & dateFormat & objAtt.DisplayName
Next
End Sub
The code is inserted into ThisOutlookSession. Macros are enabled.
The macro no longer appears in the list of macros that are able to be run.
I have tried building other macros but they too don't appear in the run list.
Does anyone have any ideas?
Thanks in anticipation.