i am trying to get Outlook features(attachments,mails,contacts) using c#.
sample Code:
using System.Text;
using Microsoft.Office.Interop.Outlook;
namespace Happy_bday_automation
{
    class Program
    {
        private void SendEmailtoContact(string name)
        {
            string subjectEmail = "Happy Bday" + name;
            string bodyEmail = "Meeting is one hour later.";
            ContactItem contact1 = new ContactItem();
            contact1.Email1Address=name+"@ca.com";
            this.CreateEmailItem(subjectEmail, contact1.Email1Address, bodyEmail);
        }
}
}
so when i am creating contactItem Object i am getting error like
An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll
Additional information: Retrieving the COM class factory for component with CLSID {00061031-0000-0000-C000-000000000046} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
please suggest some solutions :)
thanks in advance.
 
     
    