Results 1 to 11 of 11
  1. #1
    Join Date
    Apr 2008
    Posts
    189

    Question Unanswered: How to copy to clipboard an OLE object?

    Hello,
    Today, I have a new issue.

    My final gold is to copy the content of this OLE object into a Word file.
    The OLE object could be a picture, a bitmap or a Windows Metafile (WMF) or something like that.

    So, I think a solution could be to copy to clipboard the content of an OLE object in a field of a Access table (Access 2003 or 2007) and then paste it on the Word file.

    I've been reading this sites:
    API: Copy an image to the Clipboard
    ImageControlToClipBoard
    SetClipboardData Visual Basic 6 API Function
    without any luck.

    I cannot make the SetClipboardData to work.
    I mean this function:
    Code:
    Declare Function SetClipboardData Lib "User32" (ByVal wFormat _
       As Long, ByVal hMem As Long) As Long
    Any ideas?
    Help?
    Ayuda?

    Thanks in advance!

  2. #2
    Join Date
    Sep 2006
    Posts
    265
    An OLE object is a bitmap up to Access 2003. i.e. a Picture and a big one at that.

    Simon

  3. #3
    Join Date
    Apr 2008
    Posts
    189

    Red face

    So?

    Sorry, I don't get your point.

  4. #4
    Join Date
    Sep 2006
    Posts
    265
    My understanding of OLE is that images are taken of the objects as bitmaps. So you may not find that transferring a document to another application, it may only be a picture. I haven't used OLE as it would have blown away my database due to the bloated OLE bitmap formats. A 20KB jpeg could end up being 750KB.

    Simon

  5. #5
    Join Date
    Apr 2008
    Posts
    189
    Ok. Now the database is like it is.

    I just need to copy the content to some Word file.

    Ideas?

  6. #6
    Join Date
    Apr 2008
    Posts
    189
    Nothing?

    Any ideas?
    Ayuda?

  7. #7
    Join Date
    Apr 2008
    Posts
    189
    Nada, right? No ideas?

  8. #8
    Join Date
    Mar 2009
    Posts
    5,441
    Provided Answers: 14
    If would be easier to help you if you could provide detailed information about the problems you encounter (error codes, VBA code you're using, objects involved, etc...).
    I cannot make the SetClipboardData to work.
    Is quite vague and does not explain anything.
    Have a nice day!

  9. #9
    Join Date
    Apr 2008
    Posts
    189
    Sinndho thank you for your answer, but don't waste time about the SetClipboardData. What I need is to do this:

    My final gold is to copy the content of this OLE object (that is on an Access table) into a Word file.
    The OLE object could be a picture, a bitmap or a Windows Metafile (WMF) or something like that.
    How would you do that?
    Again, thank you in advance for your reply and help.

  10. #10
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    An easy way could possibly be to mailmerge the word document to the table in MSAccess.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  11. #11
    Join Date
    Apr 2008
    Posts
    189
    Quote Originally Posted by pkstormy View Post
    An easy way could possibly be to mailmerge the word document to the table in MSAccess.
    Ok, but do you have some link or example?

    I want to transfer the picture from the Table to the Word file, ok?

    Thanks for your ideas.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •