i want to download attachment of type of OLE objects from $File filed. can you please provide a code for this. i tried lots of things but no luck. i want to download file on my local. Below is my code
C#
NotesViewview=db.GetView("View Name");NotesDocumentdoc=view.GetFirstDocument();while(doc!=null){NotesRichTextItembody=(NotesRichTextItem)doc.GetFirstItem("$FILE");NotesRichTextNavigatorrtnav=body.CreateNavigator();if(rtnav.FindFirstElement(RT_ELEM.RTELEM_TYPE_FILEATTACHMENT)){Console.WriteLine("Found Something");}}
whenever i tried to get OLE object from $FILE it gives below error Unable to cast COM object of type 'System.__ComObject' to interface type 'Domino.NotesRichTextItem'