PDA

View Full Version : Email and HTML



falsuss
12-18-2017, 02:21 AM
Hello everybody,

I would like to send a complex Email using VBA and HTLM, but I cant achieve this !
I am used to send simple Email, with some link, some variable and stuff like that, but what I need today is much complex.

I need to send an Email looking kinda like one I've found in a tutorial, but cant manage with the HTML and HMTLbody. It stuff like this :


<body style="margin: 0; padding: 0;"> <table border="1" cellpadding="0" cellspacing="0" width="100%"> <tr> <td> Hello! </td> </tr> </table></body>

I've made numerous researche, but cant find a way to properly code it.

What I need is just some help to get started and the rest should be fine !

Thank you very much !

p45cal
12-18-2017, 05:46 AM
Use an online text to html converter such as https://4html.net/Online-HTML-Editor-Text-to-HTML-Converter-870.html
It keeps things short and simple.

This:

<p>Hello there <strong>falsus</strong>,</p>

<p>Hope you're keeping well,</p>

<p>regards, p45cal</p>

<p><span style="font-size:9px">Tel.555-123345</span></p>

produces this:
21202

You've posted this in an Excel forum but I'm not sure how your question relates to Excel. Perhaps https://www.rondebruin.nl/win/s1/outlook/mail.htm

p45cal
12-18-2017, 06:01 AM
More importantfor you if you want goodwill is to read up forum rules regarding cross posting.
Why? Read: http://www.excelguru.ca/content.php?184

mancubus
12-18-2017, 06:03 AM
welcome to the forum.



MailHtmlBody = "<body style=""margin: 0; padding: 0;""><Table border=""1"" cellpadding=""0"" cellspacing=""0"" width=""100%""><th>Heading1</h1><th>Heading2</h1><th>Heading3</h1><tr><td>Row1 Cell1 Value</td><td>Row1 Cell2 Value</td><td>Row1 Cell3 Value</td><tr><td>Row2 Cell1 Value</td><td>Row2 Cell2 Value</td><td>Row2 Cell3 Value</td></body>"


or (for better reading)


MailHtmlBody = "<body style=""margin: 0; padding: 0;"">" & _
"<Table border=""1"" cellpadding=""0"" cellspacing=""0"" width=""100%"">" & _
"<th>Heading1</h1><th>Heading2</h1><th>Heading3</h1>" & _
"<tr>" & _
"<td>Row1 Cell1 Value</td><td>Row1 Cell2 Value</td><td>Row1 Cell3 Value</td>" & _
"<tr>" & _
"<td>Row2 Cell1 Value</td><td>Row2 Cell2 Value</td><td>Row2 Cell3 Value</td>" & _
"</body>"

mancubus
12-18-2017, 06:09 AM
aha.
it happened again. :dunno
there was no reply to the thread when i started writing the html body. :)

falsuss
12-20-2017, 02:08 AM
Thanks !

This html converter seems to work great. I'll give it a try and hope I'll be able to do everything I need to.