Satya
Satya

Reputation: 1

Extract OLE object containg images using VBscript

An OLE Object column contains images but the image type (jpg/gif/tiff) is unknown. These images need to be extracted from the DB and saved to disk using VBscirpt.

Upvotes: 0

Views: 2363

Answers (3)

MaxD
MaxD

Reputation: 21

OLE objects is bad way of storing images in MS Access. Use OLEToDisk to save your images as pic files.

After that reimport them in nice way. Check AccessImagine for working with images in Access - it does all the hard job.

Upvotes: 1

Birger
Birger

Reputation: 4353

Here I found an example to take a screenshot with VBScript and paste it to MS Paint. Maybe you can modify it to do what you want?

http://hisudhakar.spaces.live.com/blog/cns!8DDF980C45482279!410.entry?sa=948299040

Upvotes: 0

Birger
Birger

Reputation: 4353

I've done this before in Delphi, the solution was to use the clipboard (somehow the clipboard can determine the type of image). Copy the contents of the field to the clipboard and then save the contents of the clipboard to a file.

Upvotes: 1

Related Questions