Outlk 2k3 Script: HtmlMail

N

news.microsoft.com

Hi All,

I use a personal task form that create aHtml mail with some Task item
properties and add the task.body to the mail.body

All is working fine, but if the task body contain these caracter "<>"
all the text after is ignored in my mail body

I know that "<>" represent a break in HTML so how can resolve this Pb

Tks
 
K

Ken Slovak - [MVP - Outlook]

Show the code you're using. Are you setting Body or HTMLBody?

You do know that the Body of task and other items is RTF and an email Body
is plain text? Are you massaging the data to account for that difference?
 
S

Sue Mosher [MVP-Outlook]

You must convert those characters to the proper HTML token, i.e. &lt; and &gt;. Use the Replace() function.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
N

news.microsoft.com

Hi Sue,

I put my task body in a string

strbb = item.body

then I put all this in HTML Mail BODY
StrHTML = "<hr>"& StrHTML & "<hr>" & "<p><pre><font size=2 face=Arial>" &
strbb & "</Font></pre></p>" & Signature & disclaimer




"Sue Mosher [MVP-Outlook]" <[email protected]> a écrit dans le message
de %[email protected]...
You must convert those characters to the proper HTML token, i.e. &lt; and
&gt;. Use the Replace() function.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
S

Sue Mosher [MVP-Outlook]

Again, you need to work on strbb -- using Replace() to work on the < and > characters and also using it to replace vbCrLf with <br><br> so that you can preserve line breaks.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers


news.microsoft.com said:
Hi Sue,

I put my task body in a string

strbb = item.body

then I put all this in HTML Mail BODY
StrHTML = "<hr>"& StrHTML & "<hr>" & "<p><pre><font size=2 face=Arial>" &
strbb & "</Font></pre></p>" & Signature & disclaimer




"Sue Mosher [MVP-Outlook]" <[email protected]> a écrit dans le message
de %[email protected]...
You must convert those characters to the proper HTML token, i.e. &lt; and
&gt;. Use the Replace() function.

news.microsoft.com said:
Hi All,

I use a personal task form that create aHtml mail with some Task item
properties and add the task.body to the mail.body

All is working fine, but if the task body contain these caracter "<>"
all the text after is ignored in my mail body

I know that "<>" represent a break in HTML so how can resolve this Pb

Tks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top