Hi All,
I'm using the following code:
Credit: Rule to automatically save attachment in Outlook | Pixelchef.net
I would like the add the following two items to the code:
1. Renaming the attachment: The attachment should be saved and renamed. For example, if the subject line of the e-mail contains (contains and not exact as dates in subject line will change) "ABC Company" when received, the attachment should be renamed to "1" in the local folder.
2. There will be many attachments saved in the folder. Is there a way to record what is received or not received in an Excel workbook based on the above number logic (1, 2, 3, 4)?
I would sincerely appreciate all help and guidance. Thanks in advance!
-vbahelp12
I'm using the following code:
VBA Code:
Public Sub saveAttachtoDisk (itm As Outlook.MailItem)
Dim objAtt As Outlook.Attachment
Dim saveFolder As String
saveFolder = "c:\temp\"
For Each objAtt In itm.Attachments
objAtt.SaveAsFile saveFolder & "\" & objAtt.DisplayName
Set objAtt = Nothing
Next
End Sub
Credit: Rule to automatically save attachment in Outlook | Pixelchef.net
I would like the add the following two items to the code:
1. Renaming the attachment: The attachment should be saved and renamed. For example, if the subject line of the e-mail contains (contains and not exact as dates in subject line will change) "ABC Company" when received, the attachment should be renamed to "1" in the local folder.
2. There will be many attachments saved in the folder. Is there a way to record what is received or not received in an Excel workbook based on the above number logic (1, 2, 3, 4)?
I would sincerely appreciate all help and guidance. Thanks in advance!
-vbahelp12