Hi All,
Please can you anyone kindly assist, I am looking to remove the last space after my string and just before my signaure.
Kindly ignore the dummy text but I get this annoying double space after order and above my signature "kind regards". I don't want to remove the kind regards as I use it for general email enquiries.
Really appreciate all feedback.
Please can you anyone kindly assist, I am looking to remove the last space after my string and just before my signaure.
VBA Code:
Sub Order_Follow()
Dim EApp As Object, EItem As Object, signature As Variant
Set EApp = CreateObject("Outlook.Application")
Set EItem = EApp.CreateItem(0)
Dim RList As Range
Set RList = Range("A2:A" & cells(Rows.Count, "A").End(xlUp).Row)
Dim R As Range
For Each R In RList
Set EItem = EApp.CreateItem(0)
With EItem
.Display
End With
signature = EItem.HTMLBody
With EItem
.to = R.Offset(0, 9)
.SentOnBehalfOfName = "[EMAIL]john@doe.com[/EMAIL]"
.Subject = "Order - " & R.Offset(0, 0)
.HTMLBody = "<BODY>Hi " & Split(R.Offset(0, 8), " ")(0) & "<br> <br>Hope all is well," & "<br> <br>I see you have an order - " & R.Offset(0, 0) & " Are you still interested in it, or can we kindly close the order? </BODY>" & signature
.Display
End With
Next R
Set EApp = Nothing
Set EItem = Nothing
End Sub
Kindly ignore the dummy text but I get this annoying double space after order and above my signature "kind regards". I don't want to remove the kind regards as I use it for general email enquiries.
Really appreciate all feedback.
Last edited by a moderator: