Hello everyone,
I have an exce spreadsheet called "ProjectStatus.xls" in my local folder "C:\ProjectStatus.xls".
I need to send it as an attachment to someone and I am using these codes:
Set OutlookApp = CreateObject("Outlook.Application")
Set OutlookMail = OutlookApp.CreateItem(Outlookmailitem)
OutlookMail.To = "giftxtian@yahoo.com"
OutlookMail.Subject = "Project Status"
OutlookMail.Body = "This is VB email test"
If Len(MailAttach) = 0 Then
OutlookMail.Attachments.Add "C:\ProjectStatus.xls"
End If
OutlookMail.Display 'To display the email
OutlookMail.Send 'To send the email
Set OutlookApp = Nothing
Set OutlookMail = Nothing
what is the correct code syntax to accomplish the objective?
Thanks.
tgifgemini