Quantcast
Channel: VBForums - ASP, VB Script
Viewing all articles
Browse latest Browse all 688

[RESOLVED] I want to change the VB code that is used to store attachments on hard disk

$
0
0
Hi, guys! :wave: I want to change the VB code that is used to store attachments from outlook 2010 on my hard disk. I want to modify the code shown below to it renames the output files in the case of coincidence of their names. Because attachments can come in a letter with the same name. :cry: Sorry for my English. And thanks for help!

Public Sub saveBashkomToDisk(itm As Outlook.MailItem)
Dim objAtt As Outlook.Attachment
Dim saveFolder As String
Dim dateFormat
dateFormat = Format(Now, "dd-mm-yyyy H-mm-ss ")
saveFolder = "E:\ПОЧТА\ОПЛАТА_ДЕТСКИЕ_САДЫ\Башкомснаббанк"
For Each objAtt In itm.Attachments
objAtt.SaveAsFile saveFolder & "\" & dateFormat & objAtt.DisplayName
Set objAtt = Nothing
Next
End Sub

Viewing all articles
Browse latest Browse all 688

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>