Hi I have the following code ( sent from a colleague to see if i could help)
this works fine for sendding B11 but he wants to send cells B11 to P11 ,
If i change the range from B11 to B11:P11 it does not even send ?
i have no experience with sending emails from excell so any help would be appreciated .
VBA Code:
Private Sub CommandButton1_Click()
On Error GoTo ErrHandler
' SET Outlook APPLICATION OBJECT.
Dim objOutlook As Object
Set objOutlook = CreateObject("Outlook.Application")
' CREATE EMAIL OBJECT.
Dim objEmail As Object
Set objEmail = objOutlook.CreateItem(olMailItem)
With objEmail
.to = "jim.todd@dixonsretail.com"
.Subject = "This is a test message from Battery Changer"
'.Body = "Damaged Battery Reported"
.Body = Range("B11").Value
.Send ' SEND MESSAGE.
End With
' CLEAR.
Set objEmail = Nothing: Set objOutlook = Nothing
ErrHandler:
'
End Sub
this works fine for sendding B11 but he wants to send cells B11 to P11 ,
If i change the range from B11 to B11:P11 it does not even send ?
i have no experience with sending emails from excell so any help would be appreciated .