Friday, August 6, 2010

All About Dexterity OLE Container - Follow Up

Mr. Steve Endow over at Dynamics GP Land managed to unearth my All about the Dexterity OLE Container article in response to a question he fielded from a user who no longer used GP, but wanted to know if they could extract the content embedded in the note files.

In my 2008 article I explained the intrinsic details regarding how OLE notes where created and stored in GP and promised a follow up with a way to automate or access these files externally from GP. During the past two years I have never stopped researching (on and off of course) how these files could possibly be accessed. At the end of the day, it comes down to identifying the actual storage compression algorithm used.

As part of this research, I tested a few tools including Corel's WinZip tool, which is often considered a very good tool for identifying obscure storage compression formats. However, I had no luck with WinZip. I also tried (successfully I may add) creating my own OLE container application, but failed to be able to open the Dexterity OLE Container files created by GP with it.

Over the course of my research, I came across an open source tool called 7-Zip written by Russian programmer Igor Pavlov. Pavlov managed to implement a number of compression algorithms in his tool, some even used in the early days of computing. So I decided to download 7-Zip, install it and give it a try.

To my surprise, 7-Zip was able to open a Dexterity OLE Container note file and display its content as shown below:

7-Zip shows a directory structure for the file including a contents file and an Embedding folder. I was then curious about the Embedding folder. As the name would suggest, it would probably hold the actual content of the notes itself. Earlier, I had attached a file called intellisense.txt to our favorite customer AARONFIT0001 to verify what I would see. So, on I went to open the Embedding folder, which now showed two files:

The larger file ( [1]OLE10Native ) seemed more promising than the smaller one, so I decided to edit it. All that's needed is to press F4 or go to the file menu to edit the file. Upon editing it, the file displayed in the traditional NOTEPAD.

Note that the [1]OLE10Native file displays the actual text stored in the IntelliSense.txt file. Since this file was directly embedded into the note not as a link, it would suggest that changes to this file would not affect the actual file stored on my desktop. In addition, it should be noted that the path to the actual file is stored at both the header and footer levels. This is crucial for those of you attempting to migrate your OLE files from one location to another.

I then decided to perform another test by attaching something a bit more complex, a PDF file. This time though, I decided I would attach the file as a link and would display as an icon. When a file is attached as a link, changes made to the actual file, are reflected automatically in the container.

In exploring each file, the [1]Ole file had all the information on where to find the actual link to the file:

Once again, these links can be edited if you must migrate your notes to another directory on your network.

But the question still looms -- What storage compression algorithm is used to store these files? Clearly, 7-Zip was able to open them and even expose the contents. I have a theory on the algoritm, but more on that in my next post -- and trust me, you won't have to wait 2 more years!

Until next post!

Mariano Gomez, MVP
Maximum Global Business, LLC


Jivtesh Singh said...


Nice post! Over the last few months I have also started using 7-Zip and like it more than Winzip and Winrar. Today I found another nice features :)

Steve recommended it on his blog a few months ago.

Mariano Gomez said...

Hey Jiv,
Thanks very much for the props. 7-Zip seems like the it tool though, it seems that the files stored internally are still using some sort of storage algorithm that does not allow them to be visualized in their native apps. Hopefully, I can move on to find out more about this algorithm.


Hi Mariano,

I have been using this 7-Zip for the past year. But I never knew of this until your post.

Awesome discovery and I am sure this opens up a lot for us.


Mariano Gomez said...

Hi Vaidy,
I hope I can put an end to this mistery very soon.


Anonymous said...

Any development on this? It is close to the first anniversary, so I thought I'd check :)

Seriously though, I

Kumar said...

Great article...and of course, 7-zip is awesome!

Anonymous said...


Any update on the chase?

Hugh Fiddy

Mariano Gomez said...


I have abandoned the chase.

Mariano Gomez, MVP

Anonymous said...

This might be a bit of a dead topic, but I recently came across a few cases that were seeking more solutions for this issue.

I feel that it's interesting to point out that if you use Mariano's method to open up the OLE container, you can extract the file and add .pdf to the end of the file and open the PDF from there.

In the test PDF's I attached to some Journal Entries, the file inside the OLE container was named CONTENTS. I extracted that file, changed the name to CONTENTS.pdf, and was able to open it up and view it as if I hadn't extracted it from the OLE container.

Dan Peltier
Microsoft GP
Sr. Support Engineer

Mariano Gomez said...


That's good to know. I did not go as far as extracting and renaming the contents. However, it's probably good to point out that this would only work for objects that have been embedded. If you link the objects, all you have is a pointer to the physical location of the object.


Anonymous said...


Good point, I failed to mention I was working with embedded documents. :)

Another interesting note about embedding, if you embed a Word document, then rename the entire OLE container to contain the .docx extension, you can open it in Word. You will get either a "recover" or "convert" message, but you are allowed to open it.

Dan Peltier