PowerPoint Tutorials   PowerPoint Templates   PowerPoint Blog

XML Editing in Visual Studio

Learn how XML editing is done within Visual Studio.

All the new Office file formats (post Office 2007) are XML based, and can easily be opened and edited in an XML editing program. We already showed you how all these files are a bunch of XML files contained in a ZIP file container within our Theme XML Files tutorial.

Although it is easy to unzip the files and edit some code in a basic program like Notepad, you will need a better program that does not require you to unzip and edit all the time, and then zip it up again! Thankfully there are plenty of programs that allow you to edit these Office XML files. Our favorite is Microsoft's own Visual Studio. On its own, Visual Studio cannot open and edit Office XML files, but Microsoft provides a free add-in that plugs into Visual Studio and lets you edit the Office XML files.

This free add-in tool is called Open XML Package Editor Power Tool for Visual Studio 2010, and can be downloaded from the MSDN site. Once installed, you will be able to open and edit the XML code contained within Office XML files including THMX, PPTX, POTX, etc. Figure 1 shows you how a basic THMX files appears within Visual Studio 2010.

Figure 1: A Theme file opened within Visual Studio 2010

The window on the left in Figure 1 shows the tree structure of the XML files contained within the ZIP container. Click on any of these XML files to open another window (as shown on the right in Figure 1). You can edit the code in this window to make actual changes to your THMX, PPTX, or POTX file. Thus you can make many changes to your presentation, slides, and the Theme without even opening PowerPoint. Having said so, it is a good idea to work on a copy of your actual THMX, PPTX, or POTX file since you may make a mistake while typing some code, and PowerPoint might not understand that code! This may result in you not being able to open and use that file unless you find and rectify the code error.

See Also:

Themes – XML Editing: XML Editing in Visual Studio (Index Page)