johnawebbhsd
New Member
- Joined
- Apr 4, 2003
- Messages
- 47
trying to send the active workbook after a save to an email address. email will send if I remove the line to attach. Is this incorrect code to attach?
Dim out As Object 'createobject variable
Set out = CreateObject("outlook.application")
With out.createitem(olmailitem)
.Recipients.Add "myemail@email.com" 'to: field
.Subject = "South Traffic" 'include a subject field
.body = "South traffic has been completed. See attached xls file."
.Attachments.Add ActiveWorkbook.FullName <----
.send
End With
Dim out As Object 'createobject variable
Set out = CreateObject("outlook.application")
With out.createitem(olmailitem)
.Recipients.Add "myemail@email.com" 'to: field
.Subject = "South Traffic" 'include a subject field
.body = "South traffic has been completed. See attached xls file."
.Attachments.Add ActiveWorkbook.FullName <----
.send
End With