Syntax error in mail body in vba?

Jyggalag

Active Member
Joined
Mar 8, 2021
Messages
445
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Hi all,

I have the following code for HTMLBody:

SendEmailTo.HTMLBody = "Dear all,<br/>" & "<BR>" & _
"bunch of insignificant text bunch of insignificant text bunch of insignificant text bunch of insignificant text bunch of insignificant text ""bunch of insignificant text"" bunch of insignificant text bunch of insignificant text bunch of insignificant text<br/>" & "<BR>" & _
"bunch of insignificant text bunch of insignificant text bunch of insignificant text bunch of insignificant text bunch of insignificant text bunch of insignificant text bunch of insignificant text bunch of insignificant text bunch of insignificant text bunch of insignificant text bunch of insignificant text bunch of insignificant text bunch of insignificant text bunch of insignificant text bunch of insignificant text bunch of insignificant text .<br/>" & "<BR>" & _
"bunch of insignificant text ,<b><u> bunch of insignificant text bunch of insignificant text </b></u> bunch of insignificant text bunch of insignificant text bunch of insignificant text <b>KPIs and Annual Confirmations</b>. This tool will also be used for <b>bunch of insignificant text </b>. bunch of insignificant text bunch of insignificant text bunch of insignificant text .<br/>" & "<BR>" & _
"bunch of insignificant text bunch of insignificant text bunch of insignificant text bunch of insignificant text bunch of insignificant text bunch of insignificant text bunch of insignificant text bunch of insignificant text bunch of insignificant text bunch of insignificant text bunch of insignificant text bunch of insignificant text bunch of insignificant text bunch of insignificant text bunch of insignificant text bunch of insignificant text .<br/>" & "<BR>" & _
"bunch of insignificant text bunch of insignificant text bunch of insignificant text bunch of insignificant text bunch of insignificant text bunch of insignificant text bunch of insignificant text.<br/>" & "<BR>" & _
"bunch of insignificant text bunch of insignificant text bunch of insignificant text bunch of insignificant text bunch of insignificant text bunch of insignificant text bunch of insignificant text bunch of insignificant text .<br/>" & _
"bunch of insignificant text bunch of insignificant text (bunch of insignificant text ""bunch of insignificant text ""), bunch of insignificant text .<b> bunch of insignificant text bunch of insignificant text.</b><br/>" & _
"<b> bunch of insignificant text bunch of insignificant text:<br/>" & "<BR>" & _
"<b>1- bunch of insignificant text :</b> bunch of insignificant text bunch of insignificant text bunch of insignificant text bunch of insignificant text:<br/>" & <BR> & _
"<b>-</b> bunch of insignificant text bunch of insignificant text bunch of insignificant text bunch of insignificant text bunch of insignificant text<br/>" & _
"<b>-</b> bunch of insignificant text bunch of insignificant text bunch of insignificant text bunch of insignificant text<br/>" & _
"<b>-</b> bunch of insignificant text bunch of insignificant text bunch of insignificant text bunch of insignificant text bunch of insignificant text bunch of insignificant text bunch of insignificant text <br/>" & _
"<b>-</b> bunch of insignificant text bunch of insignificant text <b> bunch of insignificant text bunch of insignificant text bunch of insignificant text</b>.<br/>" & "<BR>" & _
"<b>2-</b> bunch of insignificant text <b> bunch of insignificant text </b>, bunch of insignificant text bunch of insignificant text <b>10.02.22</b><br/>" & "<BR>" & _
"bunch of insignificant text bunch of insignificant text bunch of insignificant text <u> bunch of insignificant text </u><br/>" & "<BR>" & _
"Kind regards</br>" & "<BR>"

However, when I try to use the code (which worked before I made some string edits), it says:
1643097724458.png
while highlighting all of my email body text.

Can anybody figure out why it doesn't work? Would greatly appreciate!

Kind regards,
Jyggalag
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Nvm figured out, I had forgotten to put "" around a <BR>

Weird that it didnt highlight this specifically!

Apologies all!!!
 
Upvote 0
Solution

Forum statistics

Threads
1,223,229
Messages
6,170,881
Members
452,364
Latest member
springate

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top