Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Save clipboard image to file

Status
Not open for further replies.

Netherby

Programmer
Nov 9, 2001
32
GB
Hi,

I have an application that takes info from my database, processs it and then places a bitmap image on the clipboard.

I know the image is there because I can manually paste it into Word or PowerPoint.

What I want to do is to get VBA to save the image as a bmp file so I can then use it in an Access report. Can anyone help?

If I can't save the image, is there another way to get it into a report?

Thanks
 
So, the file is already in bitmap (BMP) format, and you basiclaly need to save it from the clipboard to a static location?

If so, all you need to do is access the clipboard via VBA:

First reference:
Tells how to get text, not sure if that can be used for objects as well.

Another detailed reference:

Also, here's a discussion, with at least one posting of a fair amount of code dealing with the clipboard.

Once you have it sorted out as to how to get to the clipboard, you'll need to save the file to your folder location. I believe you can use a few different methods to do so. I can't remember them off-hand, but when you get to that point, if you still need help, I'm pretty sure I can dig up some info - on web, as well as my own examples.
 
If you want to take a short way, you can try AccessImagine component -
It can get the image from clipboard to database with one click.

"Be aware of WordPress, it provokes to write bloggy-style..." (c) Gunna
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top