Convert image to Base64 string in VBA

S

SpeeD

Hi.

Im mapping some XML fields in a worksheet to be exported to a web page.
On of this fields is a image field and it only accepts images in a base64
string format.

how can o convert a "normal" image to a base64 string inside excel trough VBA?

thanks a Lot!!!

Speed
 
S

SpeeD

Hi joel.

For what i discovered today there some components that will do the trick.
Anyway, if anyone has some direct answer (code) to this please post it here!

SpeeD

P.S: it´s important that i only use common components (do not install
anything) because i have to distribute the Workbook...
 
T

Tim Williams

Where are the images you need to convert located?

Base64 encoding in VB/VBA:
http://www.nonhostile.com/howto-encode-decode-base64-vb6.asp
http://www.motobit.com/tips/detpg_Base64Encode/

Tim


SpeeD said:
Hi joel.

For what i discovered today there some components that will do the trick.
Anyway, if anyone has some direct answer (code) to this please post it
here!

SpeeD

P.S: it´s important that i only use common components (do not install
anything) because i have to distribute the Workbook...

joel said:
What file type is the source and the converted. Are you trying to
convert BIT mapped files to JPG or something similar. You can't convert
an image to 64 bit format by just changing the string you need a
utility.

Excel VBA can't convert directly but can call other utilites that you
have installed on your PC. Excel can convert a worksheet to either JPG
or Bit mapped by savving as a picture but I don't think this is what you
want.


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread:
http://www.thecodecage.com/forumz/showthread.php?t=168783

Microsoft Office Help

.
 
Joined
Nov 8, 2011
Messages
1
Reaction score
0
Hi,

Is it possible to get an image in base64 string format and convert it back to image to embed in excel sheet?

Many Thanks in Advance,
Jolly
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top