Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Convert image to Base64 string in VBA

1,991 views
Skip to first unread message

SpeeD

unread,
Jan 11, 2010, 7:40:01 AM1/11/10
to
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

joel

unread,
Jan 11, 2010, 9:37:35 AM1/11/10
to

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

[url="http://www.thecodecage.com"]Microsoft Office Help[/url]

SpeeD

unread,
Jan 11, 2010, 4:19:01 PM1/11/10
to
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" wrote:

> [url="http://www.thecodecage.com"]Microsoft Office Help[/url]
>
> .
>

Tim Williams

unread,
Jan 12, 2010, 1:51:34 AM1/12/10
to
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" <Sp...@discussions.microsoft.com> wrote in message
news:D9B51C6F-99B6-435E...@microsoft.com...

zbin...@gmail.com

unread,
Sep 24, 2015, 10:24:51 PM9/24/15
to
you can try this free online service to convert image to base64 string online(http://www.online-code.net/base64-image.html).
0 new messages