Inserting images from an office add-in and keeping track of them.
This is my first office add-in project so please do provide as much information as you like that might help.
I'm trying to have my office add-in insert images into a word document, these images are generated on the fly by a backend service and I currently grab the base64 encoding and use insertInlinePictureFromBase64
to add it to the document. The next feature I want requires being able to keep track of the images the add-in has inserted so that they can be updated later either via a right-click context menu or a task pane button without the user having to figure out which image in the document corresponds to the newer version of that image from the taskpane.
The problem I'm running into is that there doesn't seem to be any way (at least in the docs or after searching for a few hours) to either store some kind of queryable metadata with the image when it is inserted, or to get some kind of unique identifier for the image.
I know that the insertInlinePictureFromBase64
method returns the inserted image object which could be stored in memory for these kind of updates, but ideally I'd like the solution to work between document/add-in reloads.
Please let me know if anyone has any ideas on solving this or pointers to docs that might help with this, thanks in advance!