How to drop attachment from new Outlook to my app (process IDataObject)

Petar Madzharov 10 Reputation points
2025-03-08T08:02:18.11+00:00

I have an application that allows Drop of attachments in NEW Outlook email.

How do I process the contents in IDataObject,

{"itemType":"attachment",

"attachmentFile": {"attachmentItemId":"AQMkADAwATNiZmYAZS05MjBiLWE0OTAtMDACLTAwCgBGAAADxXhNmyJl8kilBS33BK5ZAQcAqBxUgF27qE22XqsLpesGaQAAAgEMAAAAqBxUgF27qE22XqsLpesGaQAAAhjjAAAAARIAEAAS2IywhwL/SKxInGTKuecQ","name":"cross_red.png","size":57868,"fileType":5,"type":"ItemIdAttachment:#Exchange","ContentType":"image/png"},

"mailboxInfo":

{"sourceId":"61223ed7-c622-4fdf-9d86-e2d695e038a4","type":"UserMailbox","mailboxSmtpAddress":"@outlook.com","userIdentity":"@outlook.com","mailboxRank":"Coprincipal","diagnosticData":"ASLSAccountMailbox","mailboxProvider":"Outlook"}

}

so that I can get the contents of the attached file into my application?

Microsoft 365 and Office | Development | Other

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.