HTML Table with single Border Line in VBA

powerwill

Board Regular
Joined
Sep 14, 2018
Messages
62
Office Version
  1. 365
Platform
  1. Windows
I have a macro that writes an email message to be sent on outlook, and in the email body it makes a Table using HTML.

Everything's fine except that the table borders are made of 2 lines and I want it to be 1.

Below is my html code..can somebody help?

VBA Code:
BodStrng = "Hi " & EName & "," & "<br><br>" & "Below is the snapshot of your audit." & "<br><br>" _
& "Please reach out for any clarification." & "<br><br>" & "Session Details:" & "<br><br>" _
& "<table border=1><tbody><tr><th>Test Code:</th><td>" & ECode & "</td></tr>" & "<tr><th>Test Title:</th><td>" & ETitle _
& "</td></tr>" & "<tr><th>Test Date:</th><td>" & EDate & "</td></tr>" & "<tr><th>Test Time(PST):</th><td>" & ETime _
& "</td></tr>" & "<tr><th>Test Scores %:</th><td>" & EScores & "</td></tr>" & "<tr><th>Test Accuracy %:</th><td>" & EAccy _
& "</td></tr></tbody></table>" & "<br>" & "<u><b>" & "Observation/Actions:" & "</b></u>"
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Try adding cellspacing and cellpadding:
HTML:
<table border='1' cellspacing='0' cellpadding=0'>
 
Upvote 0

Forum statistics

Threads
1,215,059
Messages
6,122,918
Members
449,093
Latest member
dbomb1414

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