Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

How to: Add Custom XML Parts to Documents Without Starting Microsoft Office

Updated: April 2011

You can add a custom XML part to a document without starting Microsoft Office Excel, Microsoft Office PowerPoint, or Microsoft Office Word. This is useful if you want to store XML data in a document on a computer that does not have Microsoft Office installed, such as a server. For more information, see Custom XML Parts Overview.

Applies to: The information in this topic applies to the following applications: Excel 2007 and Excel 2010; PowerPoint 2007 and PowerPoint 2010; Word 2007 and Word 2010. For more information, see Features Available by Office Application and Project Type.

The document must be in one of the Open XML Formats, such as .docx, .xlsx, or .pptx. You cannot access custom XML parts in the binary file formats without starting the Microsoft Office application.

To add a custom XML part to a document without starting Microsoft Office

  • Use classes in the Open XML SDK. These classes are designed to provide access to Open XML content that is specific to Office documents. For example, to add a custom XML part to an Excel workbook, you use the AddNewPart<T> method of a WorkbookPart object. For more information, see Open XML SDK 2.0.




April 2011

Removed procedural content as there were issues with the code example. Instead, provided a link to the Open XML SDK 2.0 content. That content provides the most recent examples of how to add custom XML parts to documents without starting Microsoft Office.

Content bug fix.

Community Additions

© 2015 Microsoft