I don't want to send the email nor do I need to update the subject line. I would be replying to a customer inquiry. Each one is unique. I just want the macro to insert the attachment. That is all.
I tried and receive a compilation error. Sub SendMailWithAttachment() is highlighted in yellow and below End With is says end sub is expected.
'Use the below:Sub SendMailWithAttachment()Dim CurrentMessage As MailItemSet CurrentMessage = ActiveInspector.CurrentItem CurrentMessage.Attachments.Add "C:\Macros\Tata.pdf"End Sub
'Make sure to change the attachment path.
Received another compile error. CurrentMessage.Attachments.Add C:\test.pdf" was highlighted in red and Sub SendMailWithAttachment() was in yellow
It worked. Great job. I had 5 other gurus who could not figure this out.
Attachments are only available to registered users.
I have another project. Can you program a custom addin? I would like a custom rule that would move emails that have specific words in the subject line and specific phrases in first 15 words of the body of the email to a specific folder.
Is this doable?