Click here to Skip to main content
15,868,016 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

We are trying to automate importing of contacts to Outlook (both 2003 and 2007).

Basically we read the contact details from a DB or csv file and create the contact items using C# code.

In a folder we also have contact's certificate files that we would like to attach to the above created contacts in code.

We have a code for Outlook 2007 that uses propertyaccessor and which does the import with no reported errors. However when we open Outlook contacts manually, there are no certificates attached!

To troubleshoot, we compared, byte by byte, the certificate that we import via code and the same certificate that is manually attached to a contact.

They differ for few bytes both at the begining and at the end!
It seems that Outlook adds some header and footer bytes to the attached certificate when we import it manually.

If we artificially add those header and footer bytes to our certificate in code, it will be imported and shown later in Outlook just fine!

However these header/footer bytes seem to be certificate related and are not the same for every certificate. Just their total number is the same.

The question now is, how can we determine the process of adding these extra bytes before and after the certificate so it is always recognized by Outlook?

We searched on the internet a lot in regards to this problem but so far no solution was found.

I hope someone can give us a clue on this?
Posted
Updated 6-Dec-10 4:53am
v2
Comments
Slacker007 6-Dec-10 10:53am    
Minor change: added Outlook tag.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900