Share via

How to retrieve attachment-id when adding an image attachement

Alexander Timmermans 11 Reputation points
2022-12-07T12:47:57.207+00:00

Referring to the following stackoverflow answer: https://stackoverflow.com/a/62184870/3737186

When adding an attachment as described here: https://learn.microsoft.com/en-us/office/dev/add-ins/outlook/add-and-remove-attachments-to-an-item-in-a-compose-form
Is it in the meanwhile possible to retrieve the attachement-id of the attachement through office-js? I mean the GUID of the attachment inside the email and not the id on the graphAPI.

Because often examples refer the images through the image name, but I would like to not do something like

<img src="cid=myImage.png"/>   

But rather I want to do this

<img src="cid=203c5bf3-4bda-45b2-8df2-f0db339d94b8"/>   
Microsoft 365 and Office | Development | Other
0 comments No comments
{count} votes

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.