using Microsoft.Office.Core; using Microsoft.Office.Interop.Outlook; private void button1_Click(object sender, EventArgs e) { TaskItem OutlookTask = new 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(); }
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)).
TaskItem OutlookTask = (TaskItem)Application.CreateItem(OlItemType.olTaskItem);
TaskItem OutlookTask = tasks.Items.add(OlItemType.olTaskItem);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)