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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • dtshedd@yahoo.com

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

    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)

    Me.RecordsetClo ne.MoveFirst
    'Do While Not Me.RecordsetClo ne.EOF
    Me.Bookmark = Me.RecordsetClo ne.Bookmark
    'Save the picture '
    Me.OLEBound19.S etFocus
    DoCmd.RunComman d acCmdCopy

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

Working...