Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Write OLE object containing bit map to BMP file using Visual Basic

Posted on 2008-06-19
3
347 Views
Last Modified: 2008-07-14
I have a database table with OLE objects holding BMP files.

Using DAO I can read the object into an Obejct variable and see the data as obj.value and the size as obj.FieldSize.

When I use "put" or "write" to dump the data to a file I get a different file size and I cannot view the picture.

Can you tell me what is the easiest way to write out the data to a BMP file?
0
Comment
Question by:valerieschupbach
  • 2
3 Comments
 

Accepted Solution

by:
valerieschupbach earned 0 total points
ID: 21836990
I found a solution myself at:

http://www.ammara.com/access_image_faq/read_write_blob.html

However my error was to load the bmp file through InsertObject rtaher than FileToBlob; as a result running BlobToFile will not reproduce the original image. So you have to use FileToBlob and BloToFile in conjunction for it to work well.
0
 

Author Comment

by:valerieschupbach
ID: 21836992
How can I close this question myself?
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question