Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. Error when creating Outlook Task programmaicaly

Error when creating Outlook Task programmaicaly

Scheduled Pinned Locked Moved .NET (Core and Framework)
comcsharpasp-netvisual-studiotesting
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    obarahmeh
    wrote on last edited by
    #1

    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

    N R A 3 Replies Last reply
    0
    • O 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

      N Offline
      N Offline
      Not Active
      wrote on last edited by
      #2

      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

      O 1 Reply Last reply
      0
      • O 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

        R Offline
        R Offline
        RaviRanjanKr
        wrote on last edited by
        #3

        Please don't Cross Post. you have already posted this question There[^] whatever, This Link1[How to use the Microsoft Outlook Object Library to send a message][^] and Link2[^] May help you.

        modified on Tuesday, January 4, 2011 11:49 AM

        1 Reply Last reply
        0
        • N Not Active

          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

          O Offline
          O Offline
          obarahmeh
          wrote on last edited by
          #4

          Good morning, First, I am sorry for posting in two places. The exception is thrown in the following line: TaskItem OutlookTask = new TaskItem(); And thank you for your replies. Regards

          Kind Regards OBarahmeh

          1 Reply Last reply
          0
          • O 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

            A Offline
            A Offline
            Ashwini K Singh
            wrote on last edited by
            #5

            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

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups