Ive got this code for emailing the sheet ReOrderSheet when the button is pressed:
Sub EmailSupplierWundpet()
'
' EmailSupplierWundpet Macro
' Emails Wundpet Ltd. the Re-order list
'
Set aEmail = aOutlook.CreateItem(olMailItem)
aEmail.Subject = "Oscarsons Pets & Provisions Re-Order List"
aEmail.Body = "Credit card number =."
aEmail.Attachments.Add ThisWorkbook.Path & "\data01.xls"
aEmail.Recipients.Add "orders@wundput.co.uk"
aEmail.Send
MsgBox "Email successfully sent."
End Sub
But this line keeps coming up in yellow and i dont know how to fix it? is there an easier way to doing this. is this code wrong?
Sub EmailSupplierWundpet()
'
' EmailSupplierWundpet Macro
' Emails Wundpet Ltd. the Re-order list
'
Set aEmail = aOutlook.CreateItem(olMailItem)
aEmail.Subject = "Oscarsons Pets & Provisions Re-Order List"
aEmail.Body = "Credit card number =."
aEmail.Attachments.Add ThisWorkbook.Path & "\data01.xls"
aEmail.Recipients.Add "orders@wundput.co.uk"
aEmail.Send
MsgBox "Email successfully sent."
End Sub
But this line keeps coming up in yellow and i dont know how to fix it? is there an easier way to doing this. is this code wrong?