0

We have a MS Access 365 form with a bound object frame, which is bound to a Varbinary(Max) column in the back end Azure SQL database.

The form was set up initially as a very quick fix so that users could paste screen shots from the snipping tool which would then be embedded in the database. However it now appears that users have sometimes been copying and pasting word documents rather than screenshots.

I need to be able to extract this data and save it as either a word file or image file.

I've managed to identify the type of OLE data in each record by loading into an Unbound Object Frame. The Class property is then either "Word.Document.12" or "StaticDIB". I can create the word files using the Object property and Automation, but I cannot work out how to create an image file when the class is StaticDIB.

Any help is very very much appreciated, thanks! Jim

BiigJiim
  • 165
  • 1
  • 1
  • 10
  • Review https://stackoverflow.com/questions/69010910/extract-data-from-ole-field-in-ms-access-database, https://stackoverflow.com/questions/48343122/saving-files-from-ole-objects-access-to-disc – June7 Jun 30 '23 at 16:06
  • I have reviewed both of these threads but they seemed to come to the same conclusion. I can create the file, but then if I try and read it in a program like Paint, it says it is in an unrecognised format. I think this is because the OLE header information is being left in, but I don't know how to strip that out. – BiigJiim Jul 03 '23 at 14:21
  • Bump. Does anyone have any ideas? I'm at al loss with this. Thanks, Jim – BiigJiim Jul 14 '23 at 17:55
  • Another https://stackoverflow.com/questions/114326/converting-ms-access-ole-objects-back-to-plain-jpegs-best-way#:~:text=Use%20Access%20MVP%20Stephen%20Lebans%20ExtractInventoryOLE%20tool%20to,as%20the%20OLE%20server%20to%20insert%20the%20object. Check out the Lebans reference in last answer. – June7 Jul 14 '23 at 18:01
  • Hi June7, thanks for replying. I did try downloading Stephen Lebens OleToDisk modifying it to accept an accdb and running it, but it just fell over with a Subscript Out of Range error, which I couldn't really get to to the bottom of. Assumed as it was written 20 years ago there was something about the accdb it couldn't handle. – BiigJiim Jul 14 '23 at 18:16
  • When I break the code, the lsize variable is -1714, but it looks like this should be a +ve value greater than 8. Far as i can work out it is set by Windows function CopyMemory? – BiigJiim Jul 14 '23 at 18:25
  • That's all I've got. I never had good experience with OLE field and avoid like the plague. – June7 Jul 14 '23 at 19:15

0 Answers0