M
Martijn
got a major issue;
I receive xml files by mail and want to save them automaticly in a map.
(my file is called: client.xml)
I found that i had to use VB in outlook and puted in:
thanks to:
http://www.experts-exchange.com/Applications/MS_Office/Outlook/Q_21135312.html
***
Public Sub saveAttachtoDisk (itm As Outlook.MailItem)
Dim objAtt As Outlook.Attachment
Dim saveFolder As String
saveFolder = "c:\temp\"
For Each objAtt In itm.Attachments
objAtt.SaveAsFile saveFolder & "\" & objAtt.DisplayName
Set objAtt = Nothing
Next
End Sub
*** end code
It is working fine, but the file is overwriting the file that is saved
already.
How can I change the code that if there is a file client.xml the new file is
saved as client (1).xml etc so that the original file doesn't get lost.
Thanx
I receive xml files by mail and want to save them automaticly in a map.
(my file is called: client.xml)
I found that i had to use VB in outlook and puted in:
thanks to:
http://www.experts-exchange.com/Applications/MS_Office/Outlook/Q_21135312.html
***
Public Sub saveAttachtoDisk (itm As Outlook.MailItem)
Dim objAtt As Outlook.Attachment
Dim saveFolder As String
saveFolder = "c:\temp\"
For Each objAtt In itm.Attachments
objAtt.SaveAsFile saveFolder & "\" & objAtt.DisplayName
Set objAtt = Nothing
Next
End Sub
*** end code
It is working fine, but the file is overwriting the file that is saved
already.
How can I change the code that if there is a file client.xml the new file is
saved as client (1).xml etc so that the original file doesn't get lost.
Thanx