I want to insert an in memory image (bitmap) into a Word document programmatically.
That is, I create a Word document in memory via Microsoft.Office.Interop.Word. Then I want to append a series of bitmap images into the document one after another and save to a .doc file.
I have been searching online but the only solutions I’ve found are
1) Add the image to the ClipBoard and then paste the selection into the open document using Microsoft.Office.Interop.Word.Selction.Paste().
2) Write the image out to a file and insert it using Microsoft.Office.Interop.Word.InlineShapes.AddPicture().
While both of these methods work, I find them to be very awkward especially the first option which takes control of the clipboard while the application is running.
Is there any other way to do this?