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!

HTML Email help needed.

Status
Not open for further replies.

VBDotNetProgrammer

Programmer
Jul 9, 2003
50
GB
Hi,

I create an email item like:

Dim objOutlook As New Outlook.Application()
Dim newMail As Outlook.MailItemClass

I then use the

newMail.HTMLBody = pBody

where pBody = &quot;<html><head><body><font size='2' face='Courier'>Hello \n GoodBye</font></body></head></html>&quot;

say.

Now my problem is it displays Hello \n Goodbye instead of inserting the newline like it should!

Has anyone got any ideas why its doing that since it picks up all the other html just fine?

Thanks
 
Does \n work with HTML? I thought you had to use <BR> to get a line break. I know that \n is an escape character, but I don't know if HTML recognizes that or not.

Anyway, try <BR> to get a newline.


Nick
 
Ahhh yes \n is C! Thanks for that it works now. Thats the problem coding in so many different languages these days!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top