Macro to automate attaching specific file to a new email

Kevin Buckland
Kevin Buckland used Ask the Experts™
on
I always have to attach specific files to multiple emails I send each day.  I'd like a macro that I can run after I draft a new email which attaches the following files:

Attach the file: J:\Portfolio\_Reporting & Operations\Cash Flow Sheets\Morning Cash Recon.xlsx

Thank you.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2016
Commented:
Hi,
pls try
Sub InsertAttachments1()
    Dim myAttachments As Outlook.Attachments

    Dim NewMail As MailItem, oInspector As Inspector
    Set oInspector = Application.ActiveInspector
    If oInspector Is Nothing Then
        MsgBox "No active inspector"
    Else
        Set NewMail = oInspector.CurrentItem
        If NewMail.Sent Then
            MsgBox "This is not an editable email"
        Else
            Set myAttachments = NewMail.Attachments
            myAttachments.Add "J:\Portfolio\_Reporting & Operations\Cash Flow Sheets\Morning Cash Recon.xlsx"
        End If
    End If
End Sub

Open in new window

Regards
Alexei KuznetsovMicrosoft Outlook MVP

Commented:
You can do that without macros. The free Add Attachments utility can add files from specified folder in one click on Outlook ribbon.

DISCLAIMER: I recommend this tool because I'm one of the developers, so feel free to ask any further questions.
Kevin BucklandInvestment Officer

Author

Commented:
Worked great, thank you.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial