Hi,
have this code to just down load zip file but it's downloading all, do i need to change something in the code i created a rule to subject only Weekly AP but is downloading everything.
here is the code:
thanks
have this code to just down load zip file but it's downloading all, do i need to change something in the code i created a rule to subject only Weekly AP but is downloading everything.
here is the code:
Code:
Public Sub saveAttachtoDisk(itm As Outlook.MailItem)Dim objAtt As Outlook.Attachment
Dim saveFolder As String
Dim dateFormat
dateFormat = Format(Now, "yyyy-mm-dd H-mm")
saveFolder = "M:\Navigata\Fin\Gen\Accounts Payable\Weekly AP Invoices\"
For Each objAtt In itm.Attachments
If InStr(objAtt.DisplayName, ".zip") Then
objAtt.SaveAsFile saveFolder & "\" & dateFormat & " " & objAtt.DisplayName
Set objAtt = Nothing
Next
End Sub
thanks