In addition to Solution 1:
Yes, both AddPicture* methods required file name:
http://msdn.microsoft.com/en-us/library/microsoft.office.interop.excel.shapes.addpicture.ASPX[
^],
http://msdn.microsoft.com/en-us/library/microsoft.office.interop.excel.shapes.addpicture2.ASPX[
^].
So, probably the only thing you can do is to save your resource in a temporary file, use this file and remove it later. First, to get a resource, look at the auto-generated resource file (I assume you use .resx resource). You should better create a resource from an image file created in your project, using "Add Existing File". In the auto-generated C# file, you will find a static property of the type
Image
with the name similar to the name of the original file. Just use it. This is how you save it in a file:
http://msdn.microsoft.com/en-us/library/ktx83wah%28v=vs.110%29.aspx[
^].
This is how you can get a file name for a temporary file:
http://msdn.microsoft.com/en-us/library/system.io.path.gettempfilename%28v=vs.110%29.aspx[
^].
And this is how you delete it:
http://msdn.microsoft.com/en-us/library/system.io.file.delete%28v=vs.110%29.aspx[
^].
[EDIT]
Alternatively, consider using Open XML SDK instead of Office Interop. Here are the warning from Microsoft against using Interop:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257757#kb2[
^],
http://support.microsoft.com/kb/257757/en-us[
^].
Please see this answer by Mika Wendelius:
Creating basic Excel workbook with Open XML[
^].
See also my past answer:
How to add microsoft excel 15.0 object library from Add Reference in MS Visual Studio 2010[
^].
—SA