Outlook XP Add In: security problem

  • Thread starter Thread starter Sylvain Gross
  • Start date Start date
S

Sylvain Gross

I'm currently developing an Outlook XP Add in with .NET.
This AddIn has to
· Read some Contact in the contact folder
· Modify the recipients list of a Mail Item
· Send a Mail Item
All those operation are restricted operation, due to the "new" Outlook
Guard, against virus. So when I use my Addin, I get many MessageBox
warning, where the user is asked to confirm the operation. It's not so
practical for the user !

On internet, I found a lot of solution to avoid these warning
messages, but no one suits me:
· Use Outlook Security Form (adminpack) to "trust" my assembly, and
use a COM shim component. As far as I understand, this option is
available only with Exchange. My customer will not always being
Exchange users...
· Use an application like "Redemption" which access to Outlook
functions through low level API. It seems to be OK to read some
information (contact, recipient) but when I want to Send, I get a
error message saying that I have not the permission. In Addition, some
properties are not directly available (for example
MobileTelephoneNumber) => so I have to use both Redemption, and
MAPIProp (COM wrapper for MAPI DLL's)
· Use a ClickYes application in order to automaticly Clic on the Yes
button. This solution is not so professional. And in some case,
Outlook displays a 5 second progress bar before we can validate…

So my question is: how can I access to Contact, recipients and Send()
without warning message, and without using a makeshift job. What is
the Microsoft recommended solution ?
Thank you for your help, and sorry for this long post…

Sylvain
 
I'd use Redemption. If you're getting a "no permission to send" error,
chances are that it's not related to the (not new) "object model guard" but
to the way you've created the message. I see it commonly when people try to
resend a message that they have received.

You can get to all MAPI properties with Redemption using its Fields
collection, but you shouldn't have to resort to that for
MobileTelephoneNumber. Redemption passes requests for properties like that
to the correct Outlook object, so even if they're not visible in
intellisense, they should work, at least in VB.Net (not sure about C#).

Microsoft has no recommended solution for circumventing the object model
guard for .NET applications.
 
Back
Top