Browse by Tags
All Tags »
Useful Code Snippets (RSS)
[Blog Map] It's often the case that a department manager needs to regularly send a nicely formatted status report to her general manager or that a team leader needs to send a weekly status report to a number of interested parties. To collaborate with
Read More...
[Blog Map] As most Open XML developers know, Word 2007 has a feature that tracks changes while you are editing a document. These tracked revisions are recorded in Open XML markup. It often is desirable to use the Open XML SDK to process tracked revisions
Read More...
[Blog Map] There are some circumstances where I need a variation on the DescendantsAndSelf axis method that allows me to specify that specific elements (and the descendants of those elements) are ‘trimmed’ from the returned collection. One of the things
Read More...
Microsoft Word 2007 allows you to lock a document, prohibiting users from making changes to content, while allowing them to add comments. If we have multiple documents that have the same content yet different comments, we can merge those comments into
Read More...
[Blog Map] Writing pure functional transformations a in a recursive style enables us to put together interesting transformations in a very small amount of code. Using some specific techniques that allow us to write this code very concisely, this approach
Read More...
[Blog Map] When thought of in a certain way, XML documents come in two flavors – data-centric and document-centric. Further, there are two types of document-centric documents. This post presents my thoughts about approaches to various types of document-centric
Read More...
[BlogMap] (Note: this is a post on comparing two Open XML word processing documents. For a post on comparing two XML documents, see Equality Semantics of LINQ to XML Trees .) Sometimes we want to compare two word processing documents to see if they contain
Read More...
[Blog Map] (July 1, 2009 - Updated TransformRun to be recursive) In Open XML Word processing document markup, paragraphs contain runs, and runs contain text elements. Sometimes when transforming a document, we may want to split runs differently than in
Read More...
[Blog Map] (Update June 25, 2009 - fixed bugs in event handlers associated with deleting last node and inserting node at beginning of list) Occasionally I need to query LINQ to XML nodes in reverse document order. I’m currently writing some LINQ to XML
Read More...
Code highlighted in yellow shows navigating from the package to the main document part. Code highlighted in green shows navigating from the main document part to the styles part. using System; using System.Linq; using System.IO; using System.IO.Packaging;
Read More...
One of the most effective ways to generate Open XML documents, spreadsheets, or presentations is to start with a ‘template’ document and then modify the document. For instance, you can start with a blank word processing document that is set up with your
Read More...
[Blog Map] In two previous posts , I developed a somewhat involved query to search through a word processing document for style names and/or paragraph content. This is a query that I’m developing for the PowerTools for Open XML project . In those posts,
Read More...
[Blog Map] I believe that it is easier to maintain code that is written in the functional style. For one thing, this is the very reason for many of the characteristics of functional code. No state is maintained, so we don’t have to worry about corrupting
Read More...
[Blog Map] About a week ago, I posted a very interesting guest post by Bob McClellan , where he discussed some code that allows you to more easily move/insert/delete paragraphs in Open XML documents. He is in the process of putting together a PowerShell
Read More...
[Blog Map] (Update March 27, 2009 - updated the Headers and Footers section, and added the Charts section.) We can potentially make extensive modifications to Open XML word processing documents. Many scenarios would benefit from the ability to move paragraphs
Read More...