How is it going,
I am trying to make a super simple automated email script that sends quick update emails on project statuses. Trying not to loop to death, I put all update comments in one cell with a newline char(10) for each point. Example:
When I try to translate that into VBA, I lose the Char(10):
Below is the section I am struggling with
strUpdateNotes = Range("D" & i).Text
olNewMail.HTMLBody = "Happy Friday!" & _
"<br />" & _
"<br />" & _
"Weekly Project Update!" & _
"<br />" & _
"<br />" & _
"Current Comments on the project:" & _
"<br />" & _
strUpdateNotes & _
"<br />" & _
"<br />" & _
"Let me know if you have any questions. Have a fantastic weekend!"
Is there a way to keep the newline char(10) from the cell to help with readability in the email?
Thanks!
")` - other possibilities: `strUpdateNotes = Replace(Range("D" & i).Text, vbCr, "
")` or `strUpdateNotes = Replace(Range("D" & i).Text, vbCrLf, "
")` – braX Nov 22 '21 at 04:26