Screen-cast: Exploring Margins in Open XML WordprocessingML Documents
I’ve recorded a short screen-cast that explores some approaches to setting margins in a word-processing document. I show setting margins for cells, paragraphs, and sections.
I’ve recorded a short screen-cast that explores some approaches to setting margins in a word-processing document. I show setting margins for cells, paragraphs, and sections.
I’ve written a blog post at OpenXMLDeveloper.org that presents some code to query an Open XML WordprocessingML document for fields. The code returns the field code for each field in the document. Using this code, it becomes trivial to query a document for all hyperlinks in the document. This will be the subject of my next post at OpenXMLDeveloper.org.
I’ve posted the second video in this series on Open XML WordprocessingML fields and hyperlinks. In this video, I show how the MarkupSimplifier application makes the markup for fields more understandable. In addition, I explore the ways in which fields can be nested inside other fields. This is a powerful technique, but the markup requires a bit of explanation. Before watching this video, watch the first video of this deep-dive into Open XML WordprocessingML fields and hyperlinks.
Microsoft is continually upgrading and improving their interoperability documentation. Recently, I received the word about an update to the Open Specifications Developer Center. There is a lot of updated material on the Learn Tab.
Some interesting learning modules:
Here are some new technical articles:
Fields are one of the most powerful components of WordprocessingML markup. You will see field markup in hyper-links, the TOC, dates, page references, calculated values, and much more. I’ve been asked a few questions lately about fields in WordprocessingML markup. Fields are perhaps one of the least understood aspects of WordprocessingML markup, but they are really not very hard. I’ve embarked on a four part series to explain field markup, show some example code that makes it easier to work with fields, and then show some code that reliably retrieves all hyper-links in an Open XML WordprocessingML markup. The following video is the first of this four part series:
Sometimes when researching Open XML WordprocessingML markup, extraneous markup gets in the way of your research. The extraneous markup makes it harder to see and understand the markup issues at hand. The MarkupSimplifier class (which is part of the PowerTools for Open XML project) can help a lot, but as downloaded from CodePlex, it is only a class. You need to write code to use the class, and if you want to use the markup simplifier as part of your research process, it is inconvenient. I’ve written a small WinForm application that uses the MarkupSimplifier class, and makes the use of the simplifier class much more seamless in your research.
You can download the Markup Simplifier Application at OpenXMLDeveloper.org. The code is attached to the blog post.
I’ve recorded a six minute video that shows the Markup Simplifier application in action:
Doug Mahugh has announced the release of libOPC version 0.0.1, a new API for Open XML development, on Codeplex last week. From his blog post,
This API is the first open-source cross-platform API for developers working with Open Packaging Convention (OPC) packages as used by Open XML, XPS, and other formats. Full source code is available, and it’s written in portable C99, so can be used on all popular variants of Linux/Unix, Mac OS, Windows, Android, and many other platforms. The API uses other common cross-platform open-source APIs for some of the low-level details, including ZLIB for opening ZIP-compressed packages and libXML for parsing the XML streams from the parts in the package.
This is excellent news!
I’ve posted a short (3 minute) screen-cast that shows how easy it is to change the schema for my simple document generation system that uses XPath expressions in Open XML WordprocessingML content controls. It was super-easy to do – I didn’t rehearse – just sat down and recorded the screen-cast in a single take.
This post is the 16th in a series of blog posts on generating Open XML documents. Here is the complete list: Generating Open XML WordprocessingML Documents Blog Post Series
Today, in response to a question at OpenXMLDeveloper.org, I put together a 7 minute screen-cast that shows how to create a protected spreadsheet with locked and unlocked cells. Similar to the screen-cast that I presented in How to Research Open XML Markup, this screen-cast also is a good example of the approach that I take to research Open XML markup.
I’ve write a small blog post and example at OpenXMLDeveloper.org that shows how to iterate through all content controls in a word-processing document.