Integer property in Outlook

  • Thread starter Thread starter Vladimir Chtchetkine
  • Start date Start date
V

Vladimir Chtchetkine

How can I make Outlook to treat my custom property as Integer? I have a
property that at MAPI level has type PT_LONG. When I'm adding this property
to the folder I'm using UserProperties.Add method. Unfortunately, the
closest type param that I can pass to this method is olNumber (which is
value 1). And at MAPI level this type is transformed to PT_DOUBLE which
makes my value "incompatible" with Outlook's "expectation". At the end the
column in Outlook is blank. However, as I noticed, you can add a column
(through a "Field Chooser") with type "Integer" which makes my PT_LONG value
visible in that column. So, the question is how do I do that
programmaticaly? How do I make Outlook to treat a property as an Integer?

TIA,

Vladimir
 
"Dura lex sed lex" ;-)

Man, I love this stuff!



It's amazing how this thing is working and even more amazing that it is
working more or less reliable! Today I was killed when I discovered that
querying IAttach for IMAPIProp interface returns with "no interface" error
even though declaration of IAttach claims that it's directly derived from
IMAPIProp. I mean it's such a basic thing! :-)


P.S. Thanks, Dmitry! You are, as usual, very helpful!
 
Yep, the IAttach bug's been there for ages. You just have to live with
this... I wish that was the most serious quirk.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Back
Top