• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1149
  • Last Modified:

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

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?
1
PABenjamin
Asked:
PABenjamin
  • 3
  • 2
1 Solution
 
David LeeCommented:
Hi, PABenjamin.

Yes, that's possible with a simple bit of scripting.  Is that an option?
0
 
PABenjaminAuthor Commented:
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.
0
 
David LeeCommented:
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"
        Item.Save
    End If
End Sub

Open in new window

0
 
PABenjaminAuthor Commented:
OK. I'll give it a go. I'll let you know how things turn out.
0
 
PABenjaminAuthor Commented:
Way cool!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now