LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 124
Default How to get e new line in html email (Ron De Bruin's code)

Hi,

Everything is fine until I want a html signature at which time the code
stops recognising the new line instruction.

Here's the relvant bits of the code the first works fine the second has the
problem, both codes are the same except the line:

.Body = strbody & vbNewLine & vbNewLine & Signature

changes to

.HTMLBody = strbody & vbNewLine & vbNewLine & Signature



Here's the code:

psCustomerName = "John Smith"

strbody = "Dear " & psCustomerName & "," & vbNewLine & vbNewLine & _
"This is line 1" & vbNewLine & _
"This is line 2" & vbNewLine & _
"This is line 3" & vbNewLine & _
"This is line 4":

With OutMail
.Body = strbody & vbNewLine & vbNewLine & Signature


The plain text code outputs an email that looks like:

Dear John Smith,
This is line 1
This is line 2
This is line 3
This is line 4

The HTML code outputs an email that looks like:

Dear Wilddan, This is line 1 This is line 2 This is line 3 This is line 4

Regards,



Can anyone tell me how I can find some instructions on how to format a html
email so it comes out how I want?



Thanks for your help, Mark





Regards,


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Question on using Ron de Bruin's Excel menu sample code JonWestcot[_2_] Excel Programming 4 November 20th 08 04:24 PM
Questions on Ron de Bruin's Excel Email Macro Arisrune Excel Programming 4 February 7th 08 08:15 PM
Missing dll to work with Ron de Bruin's code a Excel Programming 0 February 19th 05 03:49 PM
Code to Email with UNC in subject line Sandy[_3_] Excel Programming 1 July 14th 03 02:10 PM


All times are GMT +1. The time now is 07:30 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"