Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating HTML email

Status
Not open for further replies.

paullem

Programmer
Jan 21, 2005
80
GB
Hi,

I have an application that creates HTML emails and send them via Outlook. The emails are composed of static text and variable rich text fields. The problem is the rich text fields are not HTML meaning the carriage returns are not effective resulting in long lines of text.

Does anyone know of a way around this? I was thinking along the lines of using the VB Replace Function to replace the carriage returns in the text with the HTML equivalent.

Thanks

 
if you are creating html email then the email should contain valid html tags - i've done some in the past and built them as a valid html document (in the email body string)
Code:
<html><head></head>
<body>
<b>Stuff in bold </b><br>
Next Line <br>
Next Line <br>
 </body>
 </html>
dont know if if you need to go that far - <br> is the equivalent of carriage return
there are quite a few discussions on this topic in this forum if you want any more suggestions try this one

 
Hi,

Thanks for your reply. Managed to solve it using the following code line: strEmailFooter = Replace(strEmailFooter, ControlChars.Lf, "<br />")

Thanks,

paullem
 
No problem - i assumed that you had the carriage return replace solved yourself when i replied
Good work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top