BrerRabbit
Board Regular
- Joined
- Aug 20, 2023
- Messages
- 84
- Office Version
- 2021
- 2016
- 2013
- Platform
- Windows
I'm aware of how to do mass emails from excel with vba. What's eluding me is how to retrieve cell values and combine with html code for formatting purposes. For example, I need to retrieve the text from E4 which is a date, into another cell which will have formatting html code, which will then be captured by vba.
E4: Saturday, 23 December 2023 (generated as long date from 23/12/23)
G27: = "<a href="""&E4&""><span style="text-align:center">Search</span></a> (this isn't working as Excel is rejecting it)
VBA
strBody2 = ThisWorkbook.Sheets("CHRISTMAS INVITATIONS").Cells(27, 7).Text
In OutMail
.HTMLBody = strBody & strXmasPartyDate & strBody2 & strXmasLocation & strBody3 & strRSVP & .HTMLBody
I need to do for date, email address and for general text as well. Yes, this has to be generated from Excel. I'm avoiding merging with Word.
E4: Saturday, 23 December 2023 (generated as long date from 23/12/23)
G27: = "<a href="""&E4&""><span style="text-align:center">Search</span></a> (this isn't working as Excel is rejecting it)
VBA
strBody2 = ThisWorkbook.Sheets("CHRISTMAS INVITATIONS").Cells(27, 7).Text
In OutMail
.HTMLBody = strBody & strXmasPartyDate & strBody2 & strXmasLocation & strBody3 & strRSVP & .HTMLBody
I need to do for date, email address and for general text as well. Yes, this has to be generated from Excel. I'm avoiding merging with Word.