I have this code where every users in my list can send this out using a button but needs to show the specific user name at the bottom of email :
Sub send_email()
Dim OutApp As Object
Dim OutMail As Object
'Dim strbody As String
Dim Name As String
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
'strbody = "Hello,<br><br> Hope your doing great! I will be out on PTO.<br><br>"
On Error Resume Next
With OutMail
.To = "XYZ"
.CC = "XYZ"
.Subject = " Request PTO "
'.Body = strbody
.HTMLBody = "Hello,<br><br> Hope your doing great! I will be on PTO." & _
"<HTML><BODY><a href='link to sharepoint'><br>Click Here To Approve</br></br></a> </BODY></HTML>"
.Display
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
this has an output like this :
Hello,
Hope your doing great! I will be on PTO.
Click Here To Approve
But needs the specific user name also to be shown like this from the list
Regards,
XYZ