Removing Form during Send

R

Ronny Ong

I'm using a custom form to serve the purpose of a template, so when the item
is sent, I want to convert the item to plain text (eliminating the form).
It's not enough to select "Separate Read Layout" and generate a Body for the
Read Page, because I need to ensure that the message is immediately readable
for recipients using OWA as well as mobile devices (which eliminates the
idea of simply having an OWA form, equivalent to the Outlook form).

To do this, I've got script in the Item_Write() event which generates
HTMLBody based on the form's fields. I also set Item.MessageClass to
"IPM.Note" which results in everything working fine, except for one thing:
The Outlook Preview Pane (or "Reading Pane" in 2003) says "This item
contains active content which cannot be displayed in the Preview/Reading
Pane. Open the item to read its contents." The message displays correctly if
I open it.

Examining the MAPI properties of the item, I determined that the named
property {00062008-0000-0000-C000-000000000046}/0x00008510 is responsible
for this behavior. There are very few references to this property on the
web, but it obviously contains some flags which enable/disable Outlook UI
elements. The value of the property was 0x8448, and when I changed it to 0,
the item immediately began displaying in the Preview Pane.

If I was assured of having CDO installed on the client machines, I'd convert
the Outlook Item reference to a MAPI Item reference and zero this property
in my script, but I don't think all users will have CDO installed.

I was thinking that the FormDescription might be linked with this property.
Even though I unchecked "Send form definition with item" the FormDescription
property is still carrying the name of my custom form. Unfortunately, it
doesn't appear that Outlook allows FormDescription to be cleared or changed
in any way, on an existing item at run time.

Short of having an event handler which creates a whole new item to send (and
deletes the existing one, which seems clumsy because it may or may not have
been saved prior to sending), anyone got any ideas on how I can override the
0x8510 property?
 
S

Sue Mosher [MVP-Outlook]

Either use CDO or Redemption to whack the property(ies) that you've
identified or use code to generate a new message using plain old IPM.Note.
 

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