Table Border : HTML Email

Deepak Sahtani

New Member
Joined
Feb 17, 2016
Messages
4
Hi, I am using a function to copy excel values to outlook 2010 email, , I would like to add a border next to each cell value so that it looks like a table in the HTML email, could you please help! Thanks in advance

The code is :

Dim cashcolumn As Range, cashrow As Range, r As Range, c As Range
Dim str As String
Sheet5.Activate

Set cashcolumn = Range("A1", Range("A1").End(xlDown))



str = "<p style='color: black;font-family:calibri;font-size:14.5'><table>"

For Each r In cashcolumn

str = str & "<p style='color: black;font-family:calibri;font-size:14.5><tr>"
Set cashrow = Range(r, r.End(xlToRight))

For Each c In cashrow
str = str & "<p style='color: black;font-family:calibri;font-size:14.5'><td>" & c.Text & "</td>"
Next c

str = str & "</tr>"

Next r
str = str & "</table>"
opencash = str



End Function
 

Some videos you may like

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.

Watch MrExcel Video

Forum statistics

Threads
1,122,689
Messages
5,597,550
Members
414,155
Latest member
Grainne whiteside

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
Top