Excel Emailing
I have the following code in an excel spreadsheet to send email. The sending
of the email works fine but it does not make excel the active window after
sending. Is there a way to make excel active again so I can run other code
without having to manually activate excel.
Thanks
Pat
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(olMailItem)
With OutMail
.To = "
.CC = ""
.BCC = "
.Subject = "Machine Hours - Labor"
.Body = ""
.Attachments.Add ("\\epfilesrv\as400downloads\machine-labor\machine
hours - labor.xls")
End With
Set OutMail = Nothing
Set OutApp = Nothing
|