Rich Text Loses formatting on VBScript Replace

B

ben.agnoli

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.
 
S

Sue Mosher [MVP-Outlook]

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

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

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