I'm slowly getting there.
This is my current code which kinda works
Private Sub CommandButton13_Click()
Dim rng As Range
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
With Application
.EnableEvents = False
.ScreenUpdating = False
End With
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
strbody = "<.H3><.B>Ahoj," & _
"Níže posílám seznam objednávek.<.br>" & _
"PS:speciální objednávky mají odlišné PO, od zaslaných, je nutné kontaktovat sklad<.br>" & _
"<.br><.br><.B>Dekujeme" & _
"<.br><.br><.B>Sklad"
On Error Resume Next
EndDate = Range("H" & ActiveCell.Row).Value
With OutMail
.To = [D17].Value
.CC = ""
.BCC = ""
.Subject = ""
.body = EndDate
.Send
End With
On Error GoTo 0
With Application
.EnableEvents = True
.ScreenUpdating = True
End With
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
The only bit i want to change is in red above or
EndDate = Range("H" & ActiveCell.Row).Value
I want it to be a specific cell, in this example H6 instead of active cell.row
Tried experimenting with this and not been able to get it to work for a specific cell. Can anyone help?