Is it possible to have a permanent attachment to new emails?

Posted on 2008-11-06
1 Ratings
Last Modified: 2010-04-21
A user in our business wants to setup his mail account so that whenever he sends out a new email an attachment (a PDF document) will always go with it. I know you can make an email template that can have an attachment permanently connected to it, but the user feels that using that method is too cumbersome. Is there anyway to change the default new mail message window so that it automatically has the attachment included?
Question by:PABenjamin
    LVL 76

    Expert Comment

    by:David Lee
    Hi, PABenjamin.

    Yes, that's possible with a simple bit of scripting.  Is that an option?

    Author Comment

    Hi BlueDevilFan,

    It may be an option. It depends on how much is involved. I haven't done any scripting since messing with Javascript about 6 or 7 years ago. I would probably need a recipie to follow.
    LVL 76

    Accepted Solution

    Here's the code.  Follow these instructions to use it.

    1.  Start Outlook
    2.  Click Tools->Macro->Visual Basic Editor
    3.  If not already expanded, expand Microsoft Office Outlook Objects and click on ThisOutlookSession
    4.  Copy the code from the Code Snippet box and paste it into the right-hand pane of Outlook's VB Editor window
    5.  Edit the code as needed.  I included comment lines wherever something needs to or can change
    6.  Click the diskette icon on the toolbar to save the changes
    7.  Close the VB Editor
    8.  Click Tools->Macro->Security
    9.  Set the Security Level to Medium
    10. Close Outlook
    11. Start Outlook
    12. Outlook will display a dialog-box warning that ThisOutlookSession contains macros and asking if you want to allow them to run.  Say yes.
    Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
        If Item.Class = olMail Then
            'Edit the file path and name on the following line'
            Item.Attachments.Add "C:\MyFile.pdf"
        End If
    End Sub

    Open in new window


    Author Comment

    OK. I'll give it a go. I'll let you know how things turn out.

    Author Closing Comment

    Way cool!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Wish Marketing would stop bothering you?

    Is your marketing department constantly asking for new email signature updates? Are they requesting a different design for every department? Do they need yet another banner added? Don’t let it get you down! There is an easy way to manage all of these requests...

    Set OWA language and time zone in Exchange for individuals, all users or per database.
    Check out this infographic on what you need to make a good email signature that will work perfectly for your organization.
    Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
    The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now