Message control not updating when HTMLBody is modified in VBScript

M

Mike

I've got a custom form that, using VBScript code-behind, updates the email
body whenever the item is opened (using the Item_Open event). Here's a test
case that I've found reproduces the problem:

Function Item_Open()
Item.HtmlBody = Item.HtmlBody & "<p>This has been added to the HTMLBody."
End Function

(I know the test code above results in poorly-formed HTML, but it displays
more or less properly in Outlook XP)

Everything works as expected in olk XP, but in 2003 the newly-opened item
doesn't show the added text in the form's Message control. However, the
Reading Pane does update correctly to show the new text. Further, if i
reply or forward the opened item, the new text appears in the reply/forward.
These facts indicate to me that the item was successfully changed, but the
form just isn't reflecting the new HTMLBody of the item.

Has anyone run across this before? Anyone know if there's a way to force a
refresh of the DocSiteControl (the message body control) in the custom form,
or some other fix or workaround?
 

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