Open XML SDK: Character formatting in table cells with / without content

July 27, 2018

Once again, a question on Stack Overflow offered an intriguing problem that kept my brain busy for quite a while. When generating a table in a Word document cells containing no content would not retain the custom font size being assigned to each cell.


Web Add-ins (Word): Tabs and Tabstops – extending the API using OOXML

July 14, 2018

A few days ago I encountered a question on Stack Overflow about using tabs to align content in a Word document. The required result was something like this: I started looking at the Word JS API documentation and realized there is nothing in that object model for inserting tabs or defining tab stops.


Web Add-ins: Load, modify and insert WordOpenXML “template” file

August 27, 2015

The previous post discussed how to find out what Word Open XML is required in order to insert a particular type of content. This article will consider a practical example and demonstrate how the Word Open XML can be stored in a resource file, then loaded and modified by JavaScript code before being inserted into […]


Web Add-ins: Using Office Open XML to extend the JavaScript APIs

August 26, 2015

In both the posts about Coercion types in Word Web Add-ins and reading built-in document properties a key point is using the Word Open XML file format in order to achieve something not available in the APIs. This approach works only in Word and it can be used for almost anything. Even the newer, extended […]


Content Controls and language formatting

January 11, 2014

Long-time Word users, especially those who work on professional documentation in multilingual environments, know that you have to be very careful that the language default in Word matches the default language setting in Windows. If it doesn’t, the Windows language will override the Word language as direct formatting in the document. Documents created in such […]


Open XML SDK: Continuous section break in the middle of a paragraph

July 22, 2013

In my last post I described how to achieve a continuous section break in Word Open XML. In this post, I go into how to force the continuous section break in the middle of a paragraph.


Open XML SDK and Continuous Section breaks

July 21, 2013

There was a question the other day in the Open XML SDK forum about inserting Continuous section breaks. Inspecting a document.xml file, you’d think it would be as simple as adding a SectionType child element to a SectionProperties element associated with a paragraph’s properties, as can be seen in the following Word Open XML: <w:p><w:pPr><w:sectPr […]


Creating content from AutoText using the Open XML SDK

January 25, 2013

Since time immemorial, you’ve been able to save formatted and unformatted text for re-use in Word. Originally, this was called “AutoText”; in Office 2007 it was renamed “BuildingBlocks”. These can only be saved in Templates. Originally, they were saved by default to Normal.dot; since 2007 the default storage is an independet file, “Built-in Building Blocks.dotx”. […]


Open XML SDK, Word documents and Compatibility Mode

January 18, 2013

A relatively frequent request we see in the Open XML SDK forum is how to make the [Compatibility Mode] text in the Word title bar disappear. By default, the Open XML SDK will create a document compatible with Word 2007. When opened in a later version of Office, [Compatibility Mode] appears in the document title […]


Release of the ECMA-376 Standard 4th edition

December 26, 2012

While trying to find the namespace for an Office 2013 Ribbon I checked the ECMA pages today and discovered that the 4th edition of the ECMA-376 standard has been released this month. It can be downloaded in four parts at http://www.ecma-international.org/publications/standards/Ecma-376.htm Not yet updated are the special Office Implementation Extension standards for things like the Ribbon […]


Word 2013 WordOpenXML incomplete: missing Comments extensions

October 20, 2012

In the initial release of Word 2013 the new Comment extensions, contained in the commentsEx.xml part, are not written to the XML returned to the object model property Range.WordOpenXML.


Word 2013 Comments in WordOpenXML

September 29, 2012

Now that we’ve looked at Comments in the Word 2013 user interface and object model, it’s time to consider how this has been implemented in WordOpenXML and the Open XML SDK.


Open XML Files, Skydrive and Web apps

September 21, 2012

In the Open XML forum the other day a person was concerned about mail merge main documents they were converting from Word 2003 to Word 2010. The users insert merge fields in these documents that serve as “targets” for writing data into the documents. The software company is updating its tool to use the Open […]


Charts in Word Documents – Past and Present

September 20, 2012

There was an interesting question in the forums the other day that piqued my interest. How to create a chart in a WordOpenXML document that will function in Word 2000-2003 (using the converter in the Compatibiltiy Pack), in Word 2007 and in Word 2010. We actually figure it out in less than 24 hours! (That […]


Working with form fields using the Open XML SDK

September 18, 2012

As described in earlier posts, Word 2007 and Word 2010 don’t properly save number formats to number-type form fields. So I decided to try my hand at my first serious manipulation of Office Open XML files. As I felt more comfortable with old-fashioned XML coding, the tool presented in that post only leveraged the Open […]


From Object Model to Open XML SDK Coding

September 17, 2012

No question: I’m object model-oriented. It didn’t take me long to recognize the advantages of object-oriented programming over Word Perfect keyboard macros and the user action emulation of WordBasic when VBA was introduced in the mid-90s!


Changing form field numbering formats using Open XML

September 14, 2012

Having overcome the obstacle mentioned in my last post, I continued work on a small tool to manage the number formatting of number form fields in Word documents. While becoming acquainted with the principles of Open XML I’ve always felt there are too few samples demonstrating how to work with the various Office applications. So […]


Open XML SDK can’t open an Office file

September 11, 2012

I thought it would be really cool if I could post code that would modify Word 2007 and Word 2010 documents to fix the numbering format problem described in my last post without needing to use Word 2013. I was stymied for three days by the error message:  “The specified package is invalid. The main […]


Bug fixed: Formfield Number formatting in templates

September 10, 2012

One of the most frustrating things for Word power users and developers is the accumulation of “bugs” in the product. If a problem is not caught early in the beta stage, it’s often around to stay. When pressed, the product team will often say that changing “expected behavior” will break backwards compatibility. Another reason we hear […]