By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,686 Members | 1,333 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,686 IT Pros & Developers. It's quick & easy.

Using Sendkeys method and MS Paint to extract embedded images in MS Access

P: n/a
I have a database with hundreds of embedded photos (Microsoft Photo
3.0) Many are larger than 1 MB. I tried Stephen Lebans macro but it
did not work probably for the aforementioned reasons

Now I am trying to use the copy portion of Stephens macro and then
open MS Paint using Sendkeys to Paste and save.

The Sendkeys method is opening the Paint app but not executing the
paste command. Wondering what I am doing wrong. I have only ever use
sendkeys once and that was 8 years ago, my memory is a bit fuzzy

Here's the sendkeys macro; It seems to fail on the appactivate
command tho I do not know why. The code is taken from the Help file
for a similar example for the calculator app, and that works fine.
Appreciate any tips.

Dim ReturnValue, I
ReturnValue = Shell("MSPAINT.EXE", 1)

'Do While Not Me.RecordsetClone.EOF
Me.Bookmark = Me.RecordsetClone.Bookmark
'Save the picture '
DoCmd.RunCommand acCmdCopy

AppActivate ReturnValue
SendKeys "%EP"
SendKeys "%FS~"
SendKeys "%~"
SendKeys "%Fx~"

Jul 19 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.