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.
|