Handy Visual Studio Add-In to View Office 2007 Files
Last month when I was in Redmond I mentioned to a colleague that I really liked the Open XML format that Office 2007 was using now and how I had been playing with the format and LINQ to XML. He pointed me to the VSTO Power Tools which contains a Visual Studio Add-In called the Open XML Package Editor. This tool allows you to view Office 2007 files from Word, PowerPoint and Excel in a neat little treeview that lets you navigate the Open XML file and manipulate all the parts individually. After installing the VSTO Power Tools, just double-click on the Office 2007 file directly from your Visual Studio project to open the tool.
<From the VSTO Power Tools documentation:>
Open XML Package Editor
This is a Visual Studio 2008 add-in to allow parsing and editing of Open Packaging Conventions files, including Word, Excel and PowerPoint documents. Features include:
- Open any Office 2007 Open XML Package file or XPS Package file directly in Visual Studio.
- Intuitive, browsable tree view of the Package file.
- Open any XML part directly in Visual Studio's rich XML editor.
- Easy to use user interface for adding and removing parts and relationships.
- Import and export part contents to and from files.
- Detects when a Package file that is opened in Visual Studio is modified externally. Prompts user to reload without having to close any open XML part editors.
- Create new Office Packages from a set of templates using Visual Studio's File > New dialog.
Figure 1 shows the treeview that is provided when you open an Open XML Package file in Visual Studio:
From the treeview, if you double-click on any XML part in the file, that part will be opened in the standard Visual Studio XML editor, as shown in Figure 2:
<end docs>
One thing I noticed is that if the XML editor opens and the XML is all on one line with no breaks then just select all the contents and cut then paste it back into the editor and it will put the proper line breaks in there for you (Ctrl + A,X,V).
There are nine other tools included in the VSTO Power Tools that I highly recommend trying out if you are doing any kind of Office development with Visual Studio. Also check out the VSTO Team Blog and VSTO Developer Portal for more information on Office development with Visual Studio.
Enjoy!
Comment Notification
If you would like to receive an email when updates are made to this post, please register here
Subscribe to this post's comments using
Comments
Leave a Comment
About Beth Massi
Beth is a Program Manager on the Visual Studio Community Team at Microsoft and is responsible for producing and managing content for business application developers, driving community features and team participation onto MSDN Developer Centers (http://msdn.com), and helping make Visual Studio one of the best developer tools in the world. She also produces regular content on her blog (http://blogs.msdn.com/bethmassi), Channel 9, and a variety of other developer sites and magazines. As a community champion and a long-time member of the Microsoft developer community she also helps with the San Francisco East Bay .NET user group and is a frequent speaker at various software development events. Before Microsoft, she was a Senior Architect at a health care software product company and a Microsoft Solutions Architect MVP. Over the last decade she has worked on distributed applications and frameworks, web and Windows-based applications using Microsoft development tools in a variety of businesses. She loves teaching, hiking, mountain biking, and driving really fast.