Parsing and extracting content from Lotus Notes OLE Objects
Extracting content from OLE Objects
Last Updated: 07-Mar-2019
This support note provides a detailed and easily understandable description of Lotus Notes Object Linking & Embedded (OLE) objects / files. Content covered in the attached PDF file includes the structure of OLE objects, how to parse them, and how to extract the usable / editable content from them. A sample application has also been attached with full code for the parsing of OLE objects.
OLE objects stored in Lotus Notes documents are a special type of attachment containing embedded data from other applications.
The content for OLE objects may either be embedded (contained within the OLE object itself) or linked (where the content is contained in an externally stored file). Linked objects all point to the same source data so any updates performed on a linked object update the centrally linked file – this also requires end users to be able to access the linked file. Embedded objects have the full content stored within the object itself (and the object is stored in the Notes document) and can therefore be updated by anyone with edit access rights to the document.
Lotus Notes supports the embedding of files as OLE/1 or OLE/2 objects. For platforms that support OLE the files are embedded as OLE/2 objects and for all other platforms as OLE/1 objects. If calling the EmbedObject method from Java files are stored as OLE/1 objects. OLE objects created in Lotus Notes 3.x or earlier are also stored in OLE/1 format.
The PDF file below contains detailed and easily understandable description of Lotus Notes OLE objects. Content covered in the file includes the structure of OLE objects, how to parse them, and how to extract the usable / editable content from them.
Lotus Notes OLE File Format.pdf
Sample Application and Code
The attached sample application contains a LotusScript library / class called
Compound File Parser
for the processing of OLE objects and extracting the content from them. This class handles all the steps of extracting an OLE object from a Lotus Notes document, parsing the binary data in the OLE objects, and extracting the embedded content to a file that can be used. You may use the code in the attached sample application in your own applications.
The above PDF file contains information regarding the sample application, how to use it, and how to incorporate the design elements into your own applications. Also included in the file is code demonstrating how to use the Compound File Parser class to process OLE objects, parse the content in them, and extract the embedded content to files which can be used as normal files.
The sample application contains several documents with a mixture of OLE/1 and OLE/2 objects of different classes (ie. Microsoft Word Document, PowerPoint Presentation, xml file). An agent called
Extract Selected Documents
demonstrates the processing of each selected Notes document and the embedded OLE objects in them. The agent detects the type of OLE object (ie. OLE/1 or OLE/2) and calls the appropriate methods to process them.
Migrating content from Lotus Notes to other systems
The Export Utility for Lotus Notes enables you to easily migrate the content in any Lotus Notes database to the following formats: PDF, HTML, Microsoft Word, Microsoft Access, Microsoft Excel, IBM Connections, XML, and character delimited files such as Comma Delimited (CSV), Tab, Fixed Width, and more. The Export Utility can extract all file attachments and convert embedded OLE objects to files.
For more information and to try it out please refer to the product information page:
AGE Computer Consultancy. All rights reserved.
Material may not be reproduced or distributed in any form without permission.