ChrissyB
September 12th, 2001, 11:12 AM
Hi,
I'm trying to automate attaching an excel document to Outlook email. I've seen quite a few suggestions but cant seem to attach the document. I have included my code below.
Could someone please help me?
THANKS in advance, Christa
P
rivate Sub CommandButton_Click()
'ActiveWorkbook.SaveAs "C:\testsurvey.xls"
Dim email
Set email = CreateObject("Outlook.Application")
With email.CreateItem(olMailItem)
.to = "jdoe@tele.com"
.CC = " "
.BCC = " "
.Subject = "Customer Satisfaction Survey "
.Body = "Attached you will find the Customer Satisfaction Survey."
.Attachment.Add = "C:\testsurvey.xls"
.Display
'.Send
End With
MsgBox "Survey sent! Thank you!", , "Send Message"
Set email = Nothing
End Sub
I'm trying to automate attaching an excel document to Outlook email. I've seen quite a few suggestions but cant seem to attach the document. I have included my code below.
Could someone please help me?
THANKS in advance, Christa
P
rivate Sub CommandButton_Click()
'ActiveWorkbook.SaveAs "C:\testsurvey.xls"
Dim email
Set email = CreateObject("Outlook.Application")
With email.CreateItem(olMailItem)
.to = "jdoe@tele.com"
.CC = " "
.BCC = " "
.Subject = "Customer Satisfaction Survey "
.Body = "Attached you will find the Customer Satisfaction Survey."
.Attachment.Add = "C:\testsurvey.xls"
.Display
'.Send
End With
MsgBox "Survey sent! Thank you!", , "Send Message"
Set email = Nothing
End Sub