Consulting

Results 1 to 9 of 9

Thread: OLE Data Transfers!

  1. #1

    OLE Data Transfers!

    I have an OLE Data (Bitmap) in an access table. How to place that OLE Data (picture) in an excel sheet?

  2. #2
    VBAX Master stanl's Avatar
    Joined
    Jan 2005
    Posts
    1,141
    Location
    First, it would help to know if the bitmap is embedded as a binary OLE field or linked. Either way you would use the clipboard to transfer to Excel, but a BinaryOLE Field requires an extra step .

  3. #3
    I am having an embedded object(binary). All data-types are not same?!!! If they are then why can't we take that OLE in a recordset and transfer it everywhere we need it?

  4. #4
    VBAX Master stanl's Avatar
    Joined
    Jan 2005
    Posts
    1,141
    Location
    Embedded Images as OLEBinary Fields need to be handled with an ADO.Stream, or Excel's PasteSpecial - it is not just a simple field to field conversion.

  5. #5
    Dear Friend!
    First I want to thank you for your extensive replies even though many doesn't even want to look into my post. Anyway I believe you know the basics of handling the OLE Datatypes. I just want to know if there is any article or tutorilal which describes from the basics of the OLE Datatypes and all. Actually I want to understand it before using it than just to satisfy the immediate scenario. I believe you understand me. Kindly help. For your information this is the first time I ever have to deal with this kind of scenario.

  6. #6
    VBAX Master stanl's Avatar
    Joined
    Jan 2005
    Posts
    1,141
    Location
    First,let me say I am still not sure if your image is linked or truly embedded as Binary OLE. If the latter, then you would have already used an ADO Stream to insert the data as a Binary Array. One way to prove this:

    If you can open your Access Table and click/double-click on the image field and the image appears, then your image is linked - which means that Access merely holds a pointer to the .bmp file.

    If this is the case, then then you need to explain more fully how you expect the .bmp to be displayed in Excel.

    If you really want help from others on this forum, you should upload a sample .mdb with 1 row containing the data you want help with.

  7. #7
    Stanl...
    First I want to clear you that I Embeds not Links the Objects into the Field. As you said. It previews the Data in Table View. But I dont know how to display that data in Excel. I tried pictures.insert, but It did not work. My code anyway
    Sub storepic()
    Dim myapp As New Excel.Application
    Dim dummyset As Recordset
    Set dummyset = CurrentDb.OpenRecordset("Select * from Logos;")
    Excel.Application.Visible = True
    Excel.Workbooks.Add
    Excel.ActiveCell = dummyset("Logo_Name")
    Excel.ActiveSheet.Pictures.insert dummyset("Logo")
    End Sub

    Thanks in Advance. Thank you.

  8. #8
    VBAX Master stanl's Avatar
    Joined
    Jan 2005
    Posts
    1,141
    Location
    Please review this

    http://www.ammara.com/articles/accesspictureole.html#S2

    Your image(s) appear linked (whether you say embedded or not the process is called linking and embedding, whereas true embedded means the data is stored in raw binary format).

    My guess is that if you display the image in access, copy it to the clipboard, open excel then choose PasteSpecial it will transfer. Coding this process is another matter completely and as I generally store the data as binary in order to avoid bloat and for portability/xml transfer to other PC's I hope someone else reading this can post code for that process.

  9. #9
    thank you for you warm hospitality accorded to me and my delegation during our
    recent visit to your country.

Posting Permissions

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