Category Archives: OpenXML

epicenter Open XML Slides and C# Code #ISS2010

On Tuesday 8th June 2010 I ran my Introduction to Open XML session at the Irish Software Show in Dublin.

My Slides and C# demo code are available for download!

I have updated the demos to use the Open XML SDK 2 RTM and have provided a more advanced example of the Content Controls demo. Remember, you can view the original Content Control demo here.

Photos from the event (day 1) can be found here: http://www.flickr.com/photos/craigmurphy/sets/72157624106633205/

Screencast – Word 2007 Content Controls

At the end of October 2008 I delivered an introductory presentation about the Open XML file formats and how we might use them from within C#, i.e. programmatically. Part of that presentation demonstrated the use of Word 2007 content controls and whilst it was the primary demonstration of the evening, it was one that prompted the most discussion. To that end, I have recorded an improved version of that demonstration, you can watch it here!

During this demonstration, I was using Visual Studio 2008 SP1, the Open XML SDK 2 CTP 1 and the Word 2007 Content Control Tookit.

I would recommend viewing this full-screen, double click on the video below to “go full-screen”. Pressing Escape cancels full-screen mode.

I recorded this screencast in one sitting, however during playback I noticed a minor issue with drag’n’drop inside the Word Content Control Toolkit. It wasn’t a show-stopper, however I decided to record the offending piece a second time – you may notice a slight change in background noise during that transition.

If you have any problems viewing the video below, please let me know.

Word 2007 Content Controls – demo from Craig Murphy on Vimeo.

Need the C# source code? Here you go: get the source.

Further Reading:
http://blogs.msdn.com/mikeormond/archive/2006/08/10/694173.aspx
http://msdn.microsoft.com/en-us/library/ms406053.aspx
http://blogs.msdn.com/modonovan/archive/2006/05/23/604704.aspx

Technorati Tags: , ,

Open XML – Resources

This post serves as a placeholder for my Open XML links, resources, etc. I will update it from time to time.

History
04/11/2008 – I’ve updated the demo code to include the code used in my screencast demonstrating Word 2007 Content Controls.

03/11/2008 – I’ve updated the demo code to include examination of the customXML file that is populated by the content control example (ContentControl.docx). Demo 5 shows how we can inject our own XML into the content controls.

Demo 6 presents the few lines of code required to extract the XML (as populated by the content controls) into an XmlDocument. Once the customXML is in an XmlDocument we are free to access the nodes as required.

Thus we are now in a position were we can create a document with custom data present, pass it to a user, the user can amend the custom data, save the document and send it back to us. We can then extract that custom data for subsequent processing. I will prepare a short screencast to demonstrate this – watch this space.

28/10/2008 – Posted pre-VBUG Newcastle inaugural delivery of An Introduction to Open XML. Download the slides and Visual Studio 2008 / Open XML SDK 2 CTP1 demo code. It’s likely that I will update this code to reflect further CTP releases.

**

Eric White’s blog entry about the first CTP of the Open XML SDK V2.

Microsoft’s primary Open XML portal, OpenXMLDeveloper.org.
Microsoft’s on-line forum for Open XML

OpenXML Code Snippets (for Visual Studio 2005) (Managing code snippets)

Blogs
Brian Jones
Mauricio Ordonez
Doug Mahugh
Kevin Boske
Erika Ehrli
Gray Knowlton’s OpenXML content

Product/Technology Blogs
XPS
Word
Excel

Videos
Open XML File Formats

Using Word 2007 Content Controls
Matthew Scott: Application Development using the Open XML File Formats
Matthew provides an excellent explanation of Word 2007’s content controls and customXML parts. Before OpenXML you probably found yourself using Word bookmarks to leave placeholders inside a Word document – content controls essentially replace those.

Andrew Coates has some excellent information about using Content Controls in conjunction with Matthew’s Word Content Control Toolkit (available on CodePlex).

Technorati Tags: , , , , , , , , , ,