locked
OutLook , programmatically set userCertificate value .( ContactItem::userCertificate not working always) RRS feed

  • Question

  • OutLook security automation using c#.NET ContactItem::userCertificate


    hi,

         I am Trying to automate the process of adding security certificate for users in outlook contacts.

          I use c#.NET to set the certificate using:

          ContactItem 's userCertificate property
    e.g.
            contact.userCertificate = "c:\...\xx.cer";

          This seeems to be not working always. In the msdn documentation it is written that this property of `contactItem` class is depricated and is not intended for use in the code.

           I need  a more reliable way of setting the user's certificate in outlook contacts programmatically . Please suggest me if there is a better way of doing this.

    thanks,
    teja .
    Monday, August 10, 2009 9:36 AM

Answers

  • This task can't be done in C# directly. You need to use MAPI which is a unmanaged C++ only API. We’ve a sample code to show this. I can share that with you if you give me your email id.

    I await your response!

    Thanks,
    Dhanashri[MSFT]

     

    Monday, August 17, 2009 3:49 PM
    Moderator

All replies

  • Hi,

    Thank you for contacting Innovate on Office Forum!

    We are working on this request and will get back to you on Tuesday in the next week.

    Thanks,
    Dhanashri [MSFT].
    • Proposed as answer by Vasis Romanov Tuesday, September 22, 2009 11:45 AM
    Wednesday, August 12, 2009 10:53 PM
    Moderator
  • This task can't be done in C# directly. You need to use MAPI which is a unmanaged C++ only API. We’ve a sample code to show this. I can share that with you if you give me your email id.

    I await your response!

    Thanks,
    Dhanashri[MSFT]

     

    Monday, August 17, 2009 3:49 PM
    Moderator
  • Hi! Would you please to share that sample code for me too? I need it for the same purposes. My email is vasis.romanov@yandex.ru. Thanks.
    Wednesday, September 23, 2009 6:36 PM
  • Hi,

     

    Could you please send me the sample code that you have on how to set user certificate from code?

     

    Best regards,

    Borce Kocevski

    borce@blafsoft.com

    Monday, November 1, 2010 2:19 PM