R
Robert Cottigham
Background: I am a bit new to VBA and working with Access 2007 SP2. I am
tring to avoid an addin (e.g. managed code solutions) as I would like to just
be able to deliver the database to the clients without a bunch of DLLs, etc.
Basically, I have a table of images that I wish to load into the Office 2007
Ribbon. For a variety of reasons (including alpha channel support and a
library of images), I have to use PNG images. Now, VBA seems to despise PNG
images (e.g. LoadImage will not work with it). This causes me to have to use
GDI+ to convert the PNG images to IPicture for the ribbon. Now, I have this
working with files sitting on the disk by using the GdipCreateBitmapFromFile
function. But, it really seems sloppy to take an PNG attachment, write it out
to disk and then read it back in. I would like to convert the PNG image
directly to a IPicture in my code without going out to disk.
Question: Does anyone know how to convert a PNG image stored as an
attachment in an Access 2007 table to IPicture without writing the file out
to disk? I am guessing that it might involve the GdipCreateBitmapFromStream
function. But, I have no clue how to turn my PNG attachment into a "stream"
so I can pass it to this function.
Any assistance or advice would be greatly appreciated.
tring to avoid an addin (e.g. managed code solutions) as I would like to just
be able to deliver the database to the clients without a bunch of DLLs, etc.
Basically, I have a table of images that I wish to load into the Office 2007
Ribbon. For a variety of reasons (including alpha channel support and a
library of images), I have to use PNG images. Now, VBA seems to despise PNG
images (e.g. LoadImage will not work with it). This causes me to have to use
GDI+ to convert the PNG images to IPicture for the ribbon. Now, I have this
working with files sitting on the disk by using the GdipCreateBitmapFromFile
function. But, it really seems sloppy to take an PNG attachment, write it out
to disk and then read it back in. I would like to convert the PNG image
directly to a IPicture in my code without going out to disk.
Question: Does anyone know how to convert a PNG image stored as an
attachment in an Access 2007 table to IPicture without writing the file out
to disk? I am guessing that it might involve the GdipCreateBitmapFromStream
function. But, I have no clue how to turn my PNG attachment into a "stream"
so I can pass it to this function.
Any assistance or advice would be greatly appreciated.