![]() |
How to set a long HTMLBody
Hi,
Thank's for any help. Here's the point : I have to set an HTML background when opening an ItemMail by code. Her's my code : CODE Set MMLMsg = Application.CreateItem(olMailItem) MMLMsg.BodyFormat = olFormatHTML MMLMsg.HTMLBody= ????? /CODE How to write several lines of HTML code, including CSS style inside my VBA code ? Only one line is accepted... Is it possible to set the content in a variable ? How to do that ? Other idea ?.... -- Best regards, Marc |
How to set a long HTMLBody
No, HTMLBody takes a string, which can have embedded carriage returns
MMLMsg.HTMLBody = _ "html" & vbCrLf & _ "body" & vbCrLf & _ "bBold/b text" & vbCrLf & _ "/body" & vbCrLf & _ "/html" Or, if you have HTML stored in a file, read that file into a string andd assign it to the HTMLBody property Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "mml" wrote in message ... Hi, Thank's for any help. Here's the point : I have to set an HTML background when opening an ItemMail by code. Her's my code : CODE Set MMLMsg = Application.CreateItem(olMailItem) MMLMsg.BodyFormat = olFormatHTML MMLMsg.HTMLBody= ????? /CODE How to write several lines of HTML code, including CSS style inside my VBA code ? Only one line is accepted... Is it possible to set the content in a variable ? How to do that ? Other idea ?.... -- Best regards, Marc |
All times are GMT +1. The time now is 07:53 AM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com