Use VBA to create a graphic from a picture in a table

G

Guest

I have a table with a field defined as "OLE Object" which is populated by
..JPEG images that were pasted into the database, rather than a link to an
external file.

My question is if there is a way I can write code to take that image in the
OLE field, and create a .JPEG file, name it and create a directory file.
 
D

Dirk Goldgar

Margaret Bartley said:
I have a table with a field defined as "OLE Object" which is
populated by .JPEG images that were pasted into the database, rather
than a link to an external file.

My question is if there is a way I can write code to take that image
in the OLE field, and create a .JPEG file, name it and create a
directory file.

Have a look at this :

http://www.lebans.com/oletodisk.htm

It looks to me like it probably does what you want. If not, there's
bound to be another sample on Stephen's site that does.
 
G

Guest

Thank you. I will have to study this.

This DB is doing what I want, but I notice that he uses a .DLL. I haven't
traced the code through, so I don't know what the .DLL does, if it's
necessary for this to work, or not.

I hate to use a .dll that I don't know about, and that I haven't had
permission to use.

I'll get back when I've had more of a chance to study this.

It's amazing what you've remembered!
 
S

Stephen Lebans

The DLL in question contains my routines for handling Structured Storage. It
is very difficult to work directly with Structured Storage from VB but
straightforward from C++, hence the DLL.

A quick GoogleGroups search on my last name will show you that:
1) I'm a Microsoft MVP
2) I have been posting to theses NG's for the last 7 years
3) Thousands of people use my code every day


--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
G

Guest

I wasn't questioning whether it was safe for me to use your code, I just
wasn't sure if it was proper to do so without permission, I'm working on a
project for hire.

I can see where my response could be misinterpreted. It was late at night,
and my usual terseness was not tempered by normal civility.

Thank you for your website, and for all your help.
 
S

Stephen Lebans

Hi Margaret,
all of my example source code, and the main Web page on my site state that
you are able to use my source code in your own apps, whether personal or
commercial, without cost or aknowledgement.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
D

Douglas J. Steele

Stephen: Margaret's concern may be that some companies (such as mine...) do
not allow DLLs to be added unless they know the source. Unfortunately, I
doubt very much that I'd be able to convince our company to use one of your
DLLs: it's pretty much a standard policy that they don't allow freeware!
 
S

Stephen Lebans

Hi Doug,
I've made the source code available to several organizations exactly because
of "security concerns" including a couple of banks and NASA of all places.
But I don't release the source code as a rule.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
D

Douglas J. Steele

It's a moot point where I work, Stephen. Releasing source code wouldn't make
any difference to them (although I suppose I could get away with it if I
"created" the DLL myself as part of an application).

I don't blame you for not releasing the source code. You need some magic,
don't you? <g>
 

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