Update##
This is what i have got from the suggestions so far. Im lost as all hell...
Sub Attach()
Set objOutlookMgs = Application.ActiveInspector.CurrentItem
Dim Subject As String
Subject = Dir("H:\Contracts\Alphabetical\")
Do While Len(Subject) > 0
Attachments.Add Subject
Subject = Dir
Loop
End Sub
Original Post
At my work we have contracts saved as pdf's. We send these to people in a stock email template in which the only thing that changes is the subject line and the attachment. The subject line is the same as the file name I am looking to attach.
I would like to create a macro for outlook that uses the subject line to find and attach the file stored in a shared drive.
The file path is H:\Contracts\Alphabetical\x x signifies letters a-z which are sub folders which contain the files stored based on the first letter of the subject line.
I have a template we use that has a fixed body. I would like to be able to run the macro once i have entered the subject line in the template. The Subject line follows this format
"Account - ref - DATE"
Format would be something like CompanyName - 12345675 - 23OCT2014.
Is there a way of having the macro search for a file with that name and attach it automatically. I can work my way through attaching a set file each time but searching for one i have no idea about.