Create TaskItems on exchange

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Thorpe (anonymous_at_msnews.microsoft.com)
Date: 01/31/05


Date: Mon, 31 Jan 2005 15:55:34 -0000

I am building an ASP.NET we app and I need to be able to create a task and
add it to a users task list
(sending the task will also be ok as they could then click accept in the
email message through outlook)

I have currently use the Outlook Object model

ApplicationClass outLookApp = new ApplicationClass();
NameSpace NS = outLookApp.GetNamespace("MAPI");
 NS.Logon("Username","password",false,false);

   // Create a new TaskItem.
   TaskItem newTask =
(TaskItem)outLookApp.CreateItem(OlItemType.olTaskItem);
   // Configure the task at hand and save it.
   newTask.Body = "Do some work now";
   newTask.DueDate = DateTime.Now;
   newTask.Importance = OlImportance.olImportanceHigh;
   newTask.Subject = "This is a test task";
   newTask.Assign();
   newTask.Recipients.Add(someone@there.com);
   newTask.Send();

   NS.Logoff();

This way is no good as it means that outlook will popup some security
warnings which need user input. I need a way to create the tasks and
add/send the task automatically.

cheers



Relevant Pages

  • Re: Problem for using Outlook ApplicationClass
    ... > the referece to Outlook 11.0 Object Model to my project. ... > ApplicationClass outLookApp = new ApplicationClass; ... an exception is catched on the first line: ... > And the stack trace is: ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Problem for using Outlook ApplicationClass
    ... You have to add a reference to Outlook 11 Object Model.dll ... ... Peter Jausovec ... >>> ApplicationClass outLookApp = new ApplicationClass; ...
    (microsoft.public.dotnet.languages.csharp)
  • Problem for using Outlook ApplicationClass
    ... I would like to use Outlook 2003 in my application so for that, ... an exception is catched on the first line: ... ApplicationClass outLookApp = new ApplicationClass; ... And the stack trace is: ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Orange SPV M600
    ... Still a bit flaky and works better with an app ... to find BUT it means anything you create in outlook then needs manually ... A device that tells you that you've a meeting but omits ... Overall device responsiveness is pretty poor - way slower than a Palm ...
    (uk.telecom.mobile)
  • Re: Orange SPV M600
    ... Still a bit flaky and works better with an app ... to find BUT it means anything you create in outlook then needs manually ... A device that tells you that you've a meeting but omits ... Overall device responsiveness is pretty poor - way slower than a Palm ...
    (uk.telecom.mobile)