cdoPR_HTML_BODY in a custom form

S

Sonal Gupta

Hi Guys,
I am using OL-XP [SP3] on win 2k.
For one addin, I have created a custom form IPM.NOTE.xxx
On Item_close() of that form, am trying to use CDO to access MAPI
properties and save them(coz otherwise it is throwin up that security
dlg box).
I also hav to get the items HTML body.Using Item.HTMLBody is again
throwin the sec dlg box.
So While accessin cdoPR_HTML_BODY (0x1013001e) am gettin the
MAPI_E_NOT_FOUND error.
Can any one temme whats missing???

TIA
S
 
K

Ken Slovak - [MVP - Outlook]

You're using the property tag 0x10130102?

See if you get anything using 0x10090102 (PR_RTF_COMPRESSED).
 
S

Sonal Gupta

Hi ken,
Yes am getting PR_RTF_COMPRESSED prop and value.
But i hav to extract the HTML part (which otherwise i am getting from
Item.HTMLBody) .Now how to do that?
Just one more doubt.Actually, is PR_BODY_HTML exchange server version
dependent.Because from the same outlook ..for one profile i am getting
PR_BODY_HTML for msgs...but on dif profiel on diff ecahnge server this
prop is missing!!! am confused.

TIA
S


You're using the property tag 0x10130102?

See if you get anything using 0x10090102 (PR_RTF_COMPRESSED).




Sonal Gupta said:
Hi Guys,
I am using OL-XP [SP3] on win 2k.
For one addin, I have created a custom form IPM.NOTE.xxx
On Item_close() of that form, am trying to use CDO to access MAPI
properties and save them(coz otherwise it is throwin up that security
dlg box).
I also hav to get the items HTML body.Using Item.HTMLBody is again
throwin the sec dlg box.
So While accessin cdoPR_HTML_BODY (0x1013001e) am gettin the
MAPI_E_NOT_FOUND error.
Can any one temme whats missing???

TIA
S
 
K

Ken Slovak - [MVP - Outlook]

It shouldn't be Exchange version dependent, at least not if the lowest
Exchange version is 5.5. It works here with EX 5.5 and 2003. I don't have
Exchange 2000 installed but it should work.

If PR_HTML is blank you could always check PR_RTF_COMPRESSED. Look over the
data you get from that using a tool like OutlookSpy (www.dimastr.com) or any
other MAPI viewer. You will see the entire HTML wrapped in an RTF wrapper.

One thing, PR_HTML is a PT_BINARY, are you retrieving it as a BYTE array and
converting that array into a string?

If you look at the beginning of PR_RTF_COMPRESSED it would look something
like this. You can easily see the beginning of the actual HTML:

{\rtf1\ansi\ansicpg1252\fromhtml1 \deff0{\fonttbl
{\f0\fswiss\fcharset0 Arial;}
{\f1\fmodern Courier New;}
{\f2\fnil\fcharset2 Symbol;}
{\f3\fmodern\fcharset0 Courier New;}
{\f4\fswiss\fcharset0 Arial;}
{\f5\fswiss Tahoma;}}
{\colortbl\red0\green0\blue0;\red0\green0\blue255;\red0\green0\blue255;\red128\green0\blue0;}
\uc1\pard\plain\deftab360 \f0\fs24
{\*\htmltag243 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
Transitional//EN">}
{\*\htmltag3 \par }

Stripping out the RTF tags and getting the values of the "htmltag" tags
would give you the original HTML from the TNEF wrapper.
 

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