As a followup to this question about using images stored in an Excel file on a button in the ribbon:
Is it possible to use an image stored in a CustomXMLPart/CustomXMLNode in base64-encoded string as an image in an Office document without first saving it to disk and loading it back?
The place where I want to use the image takes an IPictureDisp
object as a parameter (like the LoadPicture
function returns, but that will only load files from disk).
First you need to convert your base_64 data to byte array:
from: http://thydzik.com/vb6vba-functions-to-convert-binary-string-to-base64-string/
then you can load it in memory and create your IPictureDisp using information on this topic: http://www.xtremevbtalk.com/showthread.php?t=137857