A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

How to set a long HTMLBody



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2  
Old October 28th 06, 07:39 PM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default 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




 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
MS Office 2003 always looking for MSWORD (looking a long, long time ritter197 Outlook - General Queries 7 October 29th 06 07:01 PM
How to set how long a meeting is shown in Calendar that has been. Elgie Outlook - Calandaring 1 October 4th 06 02:56 PM
HTMLBody Houston Lucifer Outlook and VBA 5 July 17th 06 01:16 PM
Spaces Removed in HTMLBody [email protected] Outlook and VBA 3 June 6th 06 09:02 PM
HTMLBody is hidden when emailing a PDF from IE? Stephen Corey Add-ins for Outlook 6 June 6th 06 03:27 PM


All times are GMT +1. The time now is 09:23 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-2025 Outlook Banter.
The comments are property of their posters.