ekto
04-23-2013, 01:39 AM
Hi,
We have five outlooks running on the network and the objective would be to save attachments to a network share. This is how our old Eudora just to work. The reason is that this way, I can just shout to my collegue and ask him to look at certain file in the network share.
I found next code:
Public Sub saveAttachtoDisk(itm As Outlook.MailItem)
Dim objAtt As Outlook.Attachment
Dim saveFolder As String
saveFolder = "E:\temp\"
For Each objAtt In itm.Attachments
objAtt.SaveAsFile saveFolder & "\" & objAtt.DisplayName
Set objAtt = Nothing
Next
End Sub
What I would like it to do is to rename the file if there is a file with that name.
Example:
File named list.txt is recieved by me and my collegue.
the file that is recieved later, get's saved as list1.txt
Is this possible and if so, how?
We have five outlooks running on the network and the objective would be to save attachments to a network share. This is how our old Eudora just to work. The reason is that this way, I can just shout to my collegue and ask him to look at certain file in the network share.
I found next code:
Public Sub saveAttachtoDisk(itm As Outlook.MailItem)
Dim objAtt As Outlook.Attachment
Dim saveFolder As String
saveFolder = "E:\temp\"
For Each objAtt In itm.Attachments
objAtt.SaveAsFile saveFolder & "\" & objAtt.DisplayName
Set objAtt = Nothing
Next
End Sub
What I would like it to do is to rename the file if there is a file with that name.
Example:
File named list.txt is recieved by me and my collegue.
the file that is recieved later, get's saved as list1.txt
Is this possible and if so, how?