Can someone tell me the syntax in a Powerplay macro for emailing a single sheet of an excel file? My code is below.
Dim objOutlook As Object
Dim objOutlookEmail As Object
Dim objOutlookAttachments As Object
Set objOutlook = CreateObject("Outlook.Application")
Set objOutlookEmail = objOutlook.CreateItem(OlMailItem)
objOutlookEmail.Subject = "email subject"
objOutlookEmail.Body = "body of email text"
objOutlookEmail.To = "username@isp.com"
Set objOutlookAttachments = objOutlookEmail.Attachments
objOutlookAttachments.Add "C:\Documents and Settings\username\Desktop\filename.xls"
objOutlookEmail.Display
objOutlookEmail.Send
Set objOutlook = Nothing
Set objOutlookEmail = Nothing
Set objOutlookAttachments = Nothing
Dim objOutlook As Object
Dim objOutlookEmail As Object
Dim objOutlookAttachments As Object
Set objOutlook = CreateObject("Outlook.Application")
Set objOutlookEmail = objOutlook.CreateItem(OlMailItem)
objOutlookEmail.Subject = "email subject"
objOutlookEmail.Body = "body of email text"
objOutlookEmail.To = "username@isp.com"
Set objOutlookAttachments = objOutlookEmail.Attachments
objOutlookAttachments.Add "C:\Documents and Settings\username\Desktop\filename.xls"
objOutlookEmail.Display
objOutlookEmail.Send
Set objOutlook = Nothing
Set objOutlookEmail = Nothing
Set objOutlookAttachments = Nothing