5 pts.
 email macro
create amacro to send an email with Excelattachment

Software/Hardware used:
ASKED: June 1, 2009  5:19 PM
UPDATED: February 15, 2010  2:48 PM

Answer Wiki:
Where does this macro run? Is it from another application? Within excel itself? Please try to be more specific. -Schmidtw
Last Wiki Answer Submitted:  June 11, 2009  6:30 pm  by  Schmidtw   11,205 pts.
All Answer Wiki Contributors:  Schmidtw   11,205 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

If you have Outlook as your email and using Excel for the macro

Dim OutApp As Object
Dim OutMail As Object

Set OutApp = CreateObject(“Outlook.Application”)
OutApp.Session.Logon

Set OutMail = OutApp.CreateItem(0)
With OutMail
.To = strEmail
.Subject = strSubject
.Body = strbody
‘get each file to attach
.Attachments.Add strFile
.Display ‘Or use Send to send without looking at the email first
End With

Set OutMail = Nothing
Set OutApp = Nothing

 170 pts.

 
 15 pts.