The short answer is Yes.
Why do you want to save the CSV to your desktop? If you want to keep it, it would be better filed in a sub folder of My Documents. The desktop is not an ideal filing environment.
If you don't want to keep it, it could better be saved in the user Temp folder.
Much the same applies to the workbook - though I presume you want to keep that?
Where in the existing workbook do you want the CSV to be copied? What determines the filename of the saved Workbook?
The basic script, to run from a rule that identifies the incoming message, and copies the csv to the desktop is as follows:
Code:
Sub CustomSaveAttachments(Item As Outlook.MailItem)
Dim olAtt As Attachment
Dim strFileName As String
If Item.Attachments.Count > 0 Then
For Each olAtt In Item.Attachments
If Right(LCase(olAtt.fileName), 3) = "csv" Then
strFileName = Environ("USERPROFILE") & "\Desktop\" & olAtt.fileName
olAtt.SaveAsFile strFileName
'Do stuff with the csv file here
Exit For
End If
Next olAtt
End If
lbl_Exit:
Exit Sub
End Sub
The Excel part you may be able to do yourself, or you will have to provide more information.