Error when creating Outlook Task programmaicaly
-
Dear All, I am developing a windows application which has a feature that when press on some button, it will do an outlook task, my code is C#: using Microsoft.Office.Core; using Microsoft.Office.Interop.Outlook; private void button1_Click(object sender, EventArgs e) { Microsoft.Office.Interop.Outlook.TaskItem OutlookTask = new Microsoft.Office.Interop.Outlook.TaskItem(); OutlookTask.Actions.Application.CreateItem(OlItemType.olTaskItem); OutlookTask.Assign(); OutlookTask.Recipients.Add("email@domain.ps"); OutlookTask.Subject = "Testing The Tasks from my application"; OutlookTask.Body = "Body: Testing The Tasks from my application"; OutlookTask.DueDate = DateTime.Today; OutlookTask.ReminderTime = OutlookTask.DueDate; OutlookTask.Save(); } The Error: Retrieving the COM class factory for component with CLSID {00061032-0000-0000-C000-000000000046} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)). note: I added the reference to use Outlook which is: Microsoft Outlook 14.0 Object Library I am using VS 2010, and my outlook is Outlook 2010 Any ideas Plz???
Kind Regards OBarahmeh
-
Dear All, I am developing a windows application which has a feature that when press on some button, it will do an outlook task, my code is C#: using Microsoft.Office.Core; using Microsoft.Office.Interop.Outlook; private void button1_Click(object sender, EventArgs e) { Microsoft.Office.Interop.Outlook.TaskItem OutlookTask = new Microsoft.Office.Interop.Outlook.TaskItem(); OutlookTask.Actions.Application.CreateItem(OlItemType.olTaskItem); OutlookTask.Assign(); OutlookTask.Recipients.Add("email@domain.ps"); OutlookTask.Subject = "Testing The Tasks from my application"; OutlookTask.Body = "Body: Testing The Tasks from my application"; OutlookTask.DueDate = DateTime.Today; OutlookTask.ReminderTime = OutlookTask.DueDate; OutlookTask.Save(); } The Error: Retrieving the COM class factory for component with CLSID {00061032-0000-0000-C000-000000000046} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)). note: I added the reference to use Outlook which is: Microsoft Outlook 14.0 Object Library I am using VS 2010, and my outlook is Outlook 2010 Any ideas Plz???
Kind Regards OBarahmeh
Please edit your post and format the code snippets appropriately, i.e. use the "code block" toolbar item. You will get a better response if you follow the guidelines here. Might be a silly question, but you do have the proper version of Outlook on the machine you are running this on correct? Which line is throwing the exception?
I know the language. I've read a book. - _Madmatt
-
Dear All, I am developing a windows application which has a feature that when press on some button, it will do an outlook task, my code is C#: using Microsoft.Office.Core; using Microsoft.Office.Interop.Outlook; private void button1_Click(object sender, EventArgs e) { Microsoft.Office.Interop.Outlook.TaskItem OutlookTask = new Microsoft.Office.Interop.Outlook.TaskItem(); OutlookTask.Actions.Application.CreateItem(OlItemType.olTaskItem); OutlookTask.Assign(); OutlookTask.Recipients.Add("email@domain.ps"); OutlookTask.Subject = "Testing The Tasks from my application"; OutlookTask.Body = "Body: Testing The Tasks from my application"; OutlookTask.DueDate = DateTime.Today; OutlookTask.ReminderTime = OutlookTask.DueDate; OutlookTask.Save(); } The Error: Retrieving the COM class factory for component with CLSID {00061032-0000-0000-C000-000000000046} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)). note: I added the reference to use Outlook which is: Microsoft Outlook 14.0 Object Library I am using VS 2010, and my outlook is Outlook 2010 Any ideas Plz???
Kind Regards OBarahmeh
-
Please edit your post and format the code snippets appropriately, i.e. use the "code block" toolbar item. You will get a better response if you follow the guidelines here. Might be a silly question, but you do have the proper version of Outlook on the machine you are running this on correct? Which line is throwing the exception?
I know the language. I've read a book. - _Madmatt
-
Dear All, I am developing a windows application which has a feature that when press on some button, it will do an outlook task, my code is C#: using Microsoft.Office.Core; using Microsoft.Office.Interop.Outlook; private void button1_Click(object sender, EventArgs e) { Microsoft.Office.Interop.Outlook.TaskItem OutlookTask = new Microsoft.Office.Interop.Outlook.TaskItem(); OutlookTask.Actions.Application.CreateItem(OlItemType.olTaskItem); OutlookTask.Assign(); OutlookTask.Recipients.Add("email@domain.ps"); OutlookTask.Subject = "Testing The Tasks from my application"; OutlookTask.Body = "Body: Testing The Tasks from my application"; OutlookTask.DueDate = DateTime.Today; OutlookTask.ReminderTime = OutlookTask.DueDate; OutlookTask.Save(); } The Error: Retrieving the COM class factory for component with CLSID {00061032-0000-0000-C000-000000000046} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)). note: I added the reference to use Outlook which is: Microsoft Outlook 14.0 Object Library I am using VS 2010, and my outlook is Outlook 2010 Any ideas Plz???
Kind Regards OBarahmeh
This problem is related with your outlook installation, please check if you are able to search ‘00061032-0000-0000-C000-000000000046’ in your registry if not then run the outlook setup again