View Single Post
  #5  
Old April 4th 07, 02:43 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default How to get Microsoft.Office.Interop.Outlook.TaskItem from the IUnknown (C#)

That's the way I'd do it, using a save to file.

You might want to post in the microsoft.public.win32.programmer.messaging
group with this question. It's not strictly a MAPI question, which is what
the group is for, but it's sufficiently close that the MAPI experts there
may be able to help better than we can here.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Godandag" wrote in message
ups.com...
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