Hi,
I am using Outlook to automatically download a particular CSV attachment I receive by using Outlook Rules and the code below. This process works fine. However, I would like to download the file as an Excel file instead of its default CSV format. Could you please help me make that happen? How can I build onto the following code to make that happen?
Thank you!
I am using Outlook to automatically download a particular CSV attachment I receive by using Outlook Rules and the code below. This process works fine. However, I would like to download the file as an Excel file instead of its default CSV format. Could you please help me make that happen? How can I build onto the following code to make that happen?
Code:
Public Sub SaveAttachmentsToDisk(MItem As Outlook.MailItem)
Dim oAttachment As Outlook.Attachment
Dim sSaveFolder As String
sSaveFolder = "C:\Users\MTaieb\Desktop\VBA Training\"
For Each oAttachment In MItem.Attachments
oAttachment.SaveAsFile sSaveFolder & oAttachment.DisplayName
Next
End Sub
Thank you!