
It looks you need to hire a developer.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
My current VBS script saves the file to the drive I need and as the file's name, but it saves the attachment as a generic file, and when I open it up, it is a string. All the attachments are Excel files, but I cannot figure out why they were saved as generic files. I know it has to do with me saving the attachments as the email subject because I originally had the file saved as the attachment name. I need outlook to automatically download my excel files and save them to my folder.
Current Script
Public Sub SaveAttachmentsToDisk(MItem As Outlook.MailItem)
Dim oAttachment As Outlook.Attachment
Dim sSaveFolder As String
Dim objSubject As String
sSaveFolder = "H:\Outlook Attachments\"
For Each oAttachment In MItem.Attachments
oAttachment.SaveAsFile sSaveFolder & MItem.Subject
Next
End Sub
Original Script
Public Sub SaveAttachmentsToDisk(MItem As Outlook.MailItem)
Dim oAttachment As Outlook.Attachment
Dim sSaveFolder As String
sSaveFolder = "H:\Outlook Attachments\"
For Each oAttachment In MItem.Attachments
oAttachment.SaveAsFile sSaveFolder & oAttachment.DisplayName
Next
End Sub
P.s. I am not sure if I used the right tags, I could not find a tag for vbscript
It looks you need to hire a developer.
Your line can be a success but Subject has no extinction
oAttachment.SaveAsFile sSaveFolder & MItem.Subject
Then you should add in from original DisplayName
Can you?
And if you have more then One attachment then you should be sure do not overwriting :)
Regards.