0
votes

I am trying to add the inline image file attachment to NotesDocument object in C#. I am facing issue when system is having Lotus Notes version below 8.5.

Here is my sample code

NotesRichTextItem obj_notesRichTextItem = MailDoc.CreateRichTextItem("Attachment");

NotesEmbeddedObject obj_notesEmbeddedObject =obj_notesRichTextItem.EmbedObject(EMBED_TYPE.EMBED_ATTACHMENT, "",AttachPath,"Attachment");

I am getting following error

Attempted to read or write protected memory. This is often an indication that other memory is corrupt

Please suggest some solution.

Thank you

1

1 Answers

0
votes

The name is optional and not a valid argument for attachments. It's been a long time since I last used C#, but if I recall correctly, that should be handled with System.Type.Missing (unless there's something else for optional arguments without defaults now).