View Single Post
  #2  
Old April 20th 06, 12:31 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Rich Text Loses formatting on VBScript Replace

That's normal, expected behavior. You have jump through quite a few hoops if you want to preserve RTF formatting; see http://www.outlookcode.com/d/formatmsg.htm

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

wrote in message oups.com...
I have an outlook form in which I have a small amount of code behind,
simply to change a hyperlink to encorperate then value entered in a
compulsary custom field. The code is as follows:

Function Item_Send()
Item.Body = Replace(Item.Body, "@@@@@",
Item.UserProperties.Find("jobNumber").Value)
End Function

The function works, however the message (in Rich Text format) loses all
formatting. Is there any way I can keep the forms current layout?

Many Thanks in Advance!

Ben.

Ads