Group:  Microsoft Outlook ยป microsoft.public.outlook.program_addins
Thread: Fooling OOM about the "Sent" property

Geek News

Fooling OOM about the "Sent" property
arielra[ at ]gmail.com 2/27/2006 5:28:03 PM
Hello everyone.

I have a problem with my VSTO2005 addin for OL2003:
We catch the MailItem.Open event and immediately cancel the open
operation, and open a form of our own. This methodology works very nice
for us for mail items RECEIVED in the mailbox, but we encounter a
problem for items we CREATE locally (and do not send anywhere). The
same piece of code that cancels the opening of the inspector just
before opening our form simply delays so the mail edit screen is
briefly shown (a couple of seconds, machine dependant).
Keeping that in mind - we followed a tip from Sue - we create not a
MailItem but a PostItem and then convert it to IPM.Message. This works
well, but recently we noticed that this does NOT work for OL clients
who work in cached mode. Bummer.
We therefore decided to take another route in fooling OL that this item
was indeed sent: we want to create a regular message item but change
the required MAPI properties to make the OOM think it is indeed "sent
== true".
Any of you have any idea which properties I need to set, if this is
even possible (within reason) or have any other explanation to any of
the freakshows I described here?

Any help will be greatly appreciated.


Ariel
(Crosspost on:
http://www.outlookcode.com/threads.aspx?forumid=4&messageid=16634 )

Re: Fooling OOM about the "Sent" property
"Ken Slovak - [MVP - Outlook]" <kenslovak[ at ]mvps.org> 2/27/2006 9:43:55 PM
Those properties on IPM.Note items are set by the MAPI transport and cannot
be set in code.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


<arielra[ at ]gmail.com> wrote in message
news:1141061283.270495.186090[ at ]i40g2000cwc.googlegroups.com...
[Quoted Text]
> Hello everyone.
>
> I have a problem with my VSTO2005 addin for OL2003:
> We catch the MailItem.Open event and immediately cancel the open
> operation, and open a form of our own. This methodology works very nice
> for us for mail items RECEIVED in the mailbox, but we encounter a
> problem for items we CREATE locally (and do not send anywhere). The
> same piece of code that cancels the opening of the inspector just
> before opening our form simply delays so the mail edit screen is
> briefly shown (a couple of seconds, machine dependant).
> Keeping that in mind - we followed a tip from Sue - we create not a
> MailItem but a PostItem and then convert it to IPM.Message. This works
> well, but recently we noticed that this does NOT work for OL clients
> who work in cached mode. Bummer.
> We therefore decided to take another route in fooling OL that this item
> was indeed sent: we want to create a regular message item but change
> the required MAPI properties to make the OOM think it is indeed "sent
> == true".
> Any of you have any idea which properties I need to set, if this is
> even possible (within reason) or have any other explanation to any of
> the freakshows I described here?
>
> Any help will be greatly appreciated.
>
>
> Ariel
> (Crosspost on:
> http://www.outlookcode.com/threads.aspx?forumid=4&messageid=16634 )
>

Re: Fooling OOM about the "Sent" property
"Ariel" <arielra[ at ]gmail.com> 2/28/2006 9:49:23 AM
I'm glad to say the I had no need to enter the labirynth of those "MAPI
transport" properties.
Seems the OOM just looks at the PR_MESSAGE_FLAGS to know if the message
was sent or not... Simply turning off the "MSGFLAG_UNSENT" flag did the
trick. (it's the first bit).

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net