Thoughts and Links about the Ecma Office Open XML Formats

While on the Ready tour, I've had lots of interest about the session I'm doing on the Ecma Office Open XML Formats. There have been some great questions from the audience, both during the session and afterwards via this blog. In response to those (and for my own interest), here are some answers and some links.


Steve Kay asked:

I have installed the file converters on my box running Office 2003.

I can read & write Office 2007 docx files, but cannot create Excel xlsx files from within Excel.  It isn't available from the 'Save As' dialog within Excel.

I can use 'Save As' from windows explorer to convert 2003 xls files to the 2007 xlsx format, but when opening with Excel it gets converted to 2003 xls format and again I cannot save as 2007 format.

Is it meant to work this way?

No, it's not meant to work that way, but you do need to make sure you read the instructions on the download page for the compatibility pack. In particular, this bit:

Ensure your system is up to date by installing all High-Priority/Required updates on Microsoft Update (required for Microsoft Office XP and 2003 users) .

This article discusses the updates required in more detail.


 The OpenXMLDeveloper.org blog is a great resource. In particular, I found these posts useful:

MSDN Articles on Open XML and Related Topics - heaps of really good pointers to info.

Working with Open Packaging parts - great article on the structure of the formats themselves which, by the way, includes the XPS format as well as the office formats.

Content Control Toolkit - link to a project on CodePlex that allows you graphically link content in a Word document to custom XML in the document (see also Gary Sharp's info below)


 Gary Sharp came to the sessions in Melbourne and then sent me a couple of follow-ups via my blog:

I spoke to you after the session – mentioning my interest in being able to store a custom dataset (xml) within a word document and then referencing it into the document.

After returning to work and doing some research, I've found the mechanism you were speaking about. Namely: Xml files stored in the CustomXML folder inside the package. The contents of these files can then be referenced to "Content Controls" within a document. While I was extremely impressed by this technology (and it will no doubt appear in several applications I contribute to), I was a little disappointed that there seems to be no UI (inside the Word client itself) to be able to make these mappings.

I was hoping for something similar to the “Insert Merge Field” picker (although more advanced) made available to the Mail Merge feature. At the very least, I was expecting something similar to a “Field” so that (with training) the end user could configure where the content appeared in the document.

I was wondering if you knew of any ways to do this (other than programmatically modifying the document xml file). For example, could a (daren’t I say) macro be used? Might office contain this UI in final release?

See comments:

https://blogs.msdn.com/modonovan/archive/2006/05/23/604704.aspx

Resources:

https://openxmldeveloper.org/articles/463.aspx

https://openxmldeveloper.org/articles/Mapping_Content_Controls_to_Custom_XML_Parts_using_Notepad.aspx

I'd really appreciate your thoughts.

And then he answered his own questions:

I just wanted to pass on a note to say that after much 'wondering' and exploring I found more than enough information on CustomXML documents and their capabilities (Didn't want you to double-up on my work...).

I now understand the reasons why a GUI for Mapping XML to Content Controls wasn't created.

Below are some links which I found invaluable:

https://blogs.msdn.com/frice/default.aspx - For manipulating the Office Ribbon UI

https://msdn2.microsoft.com/en-us/library/ms406053.aspx - For creating templates programmatically (and thus Content Controls)

https://www.codeplex.com/Wiki/View.aspx?ProjectName=dbe - Word 2007 Content Control Toolkit (absolute must-have)

https://channel9.msdn.com/ShowPost.aspx?PostID=254520 - Content Controls Intro (Toolkit demo)

https://openxmldeveloper.org/articles/463.aspx - Creating CustomXML Documents (via Packaging API)

https://openxmldeveloper.org/archive/2006/06/04/Mapping_Content_Controls_to_Custom_XML_Parts_using_Notepad.aspx - Content Controls to CustomXML (via Notepad)

Don't know if any of this will be useful to you - but I thought I'd pass it on (seeing it took me a while to sort the good from the bad).

Cheers,

Gary Sharp

Thanks Gary.


And finally, Mitch sent me

An interesting perspective on why the new office document formats are good:

https://www.popularmechanics.com/technology/industry/4201645.html?page=3