View Single Post
  #4  
Old April 4th 07, 08:26 AM posted to microsoft.public.outlook.program_addins
Godandag
external usenet poster
 
Posts: 8
Default How to get Microsoft.Office.Interop.Outlook.TaskItem from the IUnknown (C#)

I know, this concrete problem (get TaskRequestUpdateItem attachment as
TaskItem) can be solved like this:
Outlook.TaskRequestUpdateItem item;
....
Outlook.Attachments atts = item.Attachments;
Outlook.Attachment att = atts[1];

att.SaveAsFile("F:\\111.oft");
Outlook.TaskItem task =
(Outlook.TaskItem)ThisApplication.OlApp.CreateItem FromTemplate("F:\
\111.oft", Type.Missing);

but I don't like this way for some reason.
The way with wrapping IUnknown with the OOM interface is pleasant to
me much more.

Ads