Is it possible to store custom data in Microsoft documents?

Viewed 75

Given Microsofts latest 'OpenXML' document versions, ie docx, xlsx etc is it possible to store your own custom data considering they just appear to be a compressed document?

I've been looking at the latest RibbonX for excel and can see that you can store customUI.xml to configure the ribbon bar.

Now this has me wondering whether it is possible to store other data in an xml file which itself is embedded within the file itself? The interesting point would be if this could be done via VBA and whilst the file is open....

Anyone know whether this is possible? Clearly the document itself stores its own configuration there so would be interesting to know whether other data can be stored there....

2 Answers

Yes it is possible. Google Excel Custom XML Parts.

Interesting question -- so the goal is to have a custom ribbon specific to one workbook, right?

@Charles-Williams' answer will you started (and got me started just now, so accept that answer, but also check out this add-in and this to load different ribbons depending on user's Excel version, and this search.

Sounds fun, good luck!

Related