Email attachemnts

Jasperuk

New member
Local time
Today, 04:57
Joined
May 14, 2007
Messages
7
What do i have to do to the following code to get it to attach a file to the email ?

Sub SendMail() ' This routine will work will all incarnations of VBA
Dim myOutlook As Object
Dim myMailItem As Object
Set myOutlook = CreateObject("Outlook.Application")
Set myMailItem = myOutlook.createitem(0)
myMailItem.Recipients.Add "send.to@home"
myMailItem.Recipients.Add "send.to@home"
myMailItem.Subject = "Automated Email Test"
myMailItem.body = "Please do not reply to the test automation email"
myMailItem.send
Set myOutlook = Nothing
End Sub

Cheers
 
Cheers Much Appreciated
 

Users who are viewing this thread

Back
Top Bottom