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
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,871
Messages
5,834,152
Members
430,261
Latest member
quangtinator

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