views:

90

answers:

1

I have an image in a byte array (read it in from a MySQL blob column) and I need to insert that into a document using VBA and MS Word. Can I create a shape and use EnhMetaFileBits to "re-hydrate" it?

+1  A: 

You could write the byte array to a temporary file and load this file as an image into your word document. Should not be too hard to find out how to do this last step in VBA using the macro recorder.

P.S.: without having checked it myself, since I have only Office XP here, EnhMetaFileBits seems to be read-only.

Doc Brown
I thought about this one myself. It may wind up being the route I have to go. I was hoping I could do it all in memory though.
Travis Heseman