November 2009 Entries
In the further adventures of OOXML we have been looking at different approaches to tagging content in a Word template to be programmatically replaced. Initially we looked at simple in-line text as a user defined tagging system. The problem is that this is very error prone. The user has to enter the tag exactly the same every time. On top of that if the user backspaces while typing the tag or spell check flags the tag then the tag will be split into multiple tags. This is less than desirable. Content...
Posted On Wednesday, November 25, 2009 7:59 AM | Feedback (0)
As far as I have seen content controls in Office 2007 render to either a SdtRun or SdtBlock object. The nice thing is that both of these inherit from SdtElement. This allows you to take the query from my earlier post and replace SdtBlock with SdtElement and now you have a universal retrieval. Of course as with any tool you need to be careful you don’t take it too far. Depending on the structure of you document this may not do what you need. Technorati Tags: office Open XML,OOXML,LINQ,.NET...
Posted On Friday, November 06, 2009 11:14 AM | Feedback (0)
I try not to be too much of a reposter, but I got a little nostalgic on this one. I remember when the first version of this tome came out and I got a free copy when I visited Redmond for the Guided Design conference. You may not agree with everything you find in here, but it is definitely worth the read to see what Microsoft thinks architecture is. Technorati Tags: Patterns and Practices,architecture,appl... architecture guidance,microsoft...
Posted On Friday, November 06, 2009 4:36 AM | Feedback (0)
If you are using a template document and replacing text programmatically using the Office Open XML SDK 2 API you will need a way to identify the target to be replaced. One option is to use a Content Control and setting the tag value the same for all of the controls that need to be substituted with a single value. After some trial and error and a lot of digging through the DocumentReflector I came up with the following LINQ query to get a list of all blocks with the same tag name. var blocks = from...
Posted On Thursday, November 05, 2009 6:45 AM | Feedback (2)
I am branching out. nPlus1.org is having an ArcSummit event and needed someone to speak on Dependency Injection. Sign me up. If you are interested in this or the other topics to be presented please join us. There is more information about the event and a registration link below. https://www.clicktoattend.c... About nPlus1.org nPlus1.org is a site dedicated to helping Architects, aspiring Architects and Lead Developers learn, connect and contribute. On this site you’ll have...
Posted On Monday, November 02, 2009 12:40 AM | Feedback (0)