Blog - Title



  • Comments 1

PowerTools for Open XML

Processing Open XML documents using PowerShell on a server is a powerful and compelling approach to creation and modification of Open XML documents.

This blog is inactive.
New blog:

Blog TOC
PowerTools for Open XML are sample source code and guidance for developers showing how to build PowerShell cmdlets to create and modify Office Open XML documents, and scripts to demonstrate the use of the cmdlets.

To download the PowerTools for Open XML:

To install and use the PowerTools for Open XML:

  • You need to have any edition (including Express Edition) of Visual Studio 2008 installed.  Download the Express Edition.
  • You need to have PowerShell installed.  Download.
  • PowerTools is built on the Open XML SDK.  Download.

More Resources 

Screen-cast that shows how to download, build, and use the PowerTools.

PowerTools for Open XML Technical Overview (For C# developers who want to enhance or modify the PowerTools cmdlets).

Example Scripts for the PowerTools.

List of PowerTools: 


The Set-OpenXmlCustomXmlData cmdlet sets or replaces the specified custom XML part in the document.


The Remove-OpenXmlComment cmdlet locates and removes comment contents and references from Wordprocessing documents.


The Add-OpenXmlDocumentTOC cmdlet creates a Table of Contents based on the headings found it in the document. The TOC will be created at the end of the document.


The Add-OpenXmlDocumentIndex cmdlet creates an index based on the index references found in the document. The index will be created at the end of the document.


The Set-OpenXmlWatermark cmdlet adds watermark text to the background of a document. iI the DiagonalOrientation parameter is specified, then the text will be in a diagonal orientation rather than horizontal.


The Add-OpenXmlPicture cmdlet inserts a picture at a specific location inside an OpenXML document. The picture will be stored inside the document as an embedded resource. Picture location is specified by an XPath query expression.


The Set-OpenXmlHeader cmdlet inserts header parts into all sections of a Wordprocessing document.


The Lock-OpenXmlDocument cmdlet sets a lock inside one or more Wordprocessing documents to prevent them from being edited.


The Get-OpenXmlStyle cmdlet retrieves the styles definition part from a WordprocessingML or SpreadsheetML document and returns an XDocument object containing the styles content.


The Get-OpenXmlTheme cmdlet extracts the whole theme part from a Wordprocessing document as a thmx file (with media resources embedded). A Package object (System.IO.Packaging.Package) is returned that corresponds to the theme file.


The Accept-OpenXmlTextChange cmdlet processes documents with text revisions (change tracking elements), by accepting all the text changes performed on the document.


The Set-OpenXmlBackground cmdlet changes the background image or background color of a Wordprocessing document.


The Get-OpenXmlComment extracts all the comments from a document, and return all of them in a XDocument


The Add-OpenXmlDigitalSignature cmdlet uses a digital certificate to digitally sign a Wordprocessing document.


The Get-OpenXmlDocument cmdlet returns an OpenXML document object for each document file. The actual object will depend on the type of document in the file. For example, if it is a spreadsheet, the object will be a SpreadsheetDocument, which is derived from OpenXMLDocument.


The Get-OpenXmlCustomXmlData cmdlet gets the first custom Xml part that matches the given name and returns it as an XDocument object.


The Export-OpenXmlToHtml cmdlet transforms the content of Wordprocessing documents into an html file by applying an XSLT transformation over the main content and extracting images from the package to a given location.


The Add-OpenXmlDocumentTOA cmdlet creates a Table of Authorities based on the citations (references or authorities) found it in the document. The TOA will be created at the end of the document.


The Set-OpenXmlStyle cmdlet replaces the style library in a WordprocessingML or SpreadsheetML document.


The Get-OpenXmlFooter cmdlet retrieves all the specified footer parts from a document and returns an XDocument array of those footers. An object is returned for the specified footer in each Section of the document.


The Get-OpenXmlDigitalSignature cmdlet returns a summary of digital signatures present in the Wordprocessing document


The Set-OpenXmlTheme cmdlet sets the current theme in a Wordprocessing document to the specified theme.


The Remove-OpenXmlDigitalSignature cmdlet removes digital signatures from a Wordprocessing document


The Add-OpenXmlContent cmdlet injects custom xml markup inside a given part from a Wordprocessing document


The Export-OpenXmlWordprocessing uses plain text to create a Wordprocessing document.


The Set-OpenXmlContentFormat cmdlet inserts markup containing format to be applied on a given run or paragraph. Format location is specified as an xpath query.


The Set-OpenXmlFooter cmdlet inserts footer parts into all sections of a Wordprocessing document.


The Get-OpenXmlWatermark cmdlet retrieves the text of the document's watermark.


The Get-OpenXmlBackground cmdlet extracts the background (color or image) from a document according to the parameters Image or Color.


The Export-OpenXmlSpreadsheet gets the public properties from any objects and generates a spreadsheet with columns showing for each property. Optionally, a chart can be created from a subset of those properties.


The Set-OpenXmlContentStyle cmdlet inserts inserts markup containing the style format to be applied on a given run or paragraph. Format location is specified as an xpath query.


The Add-OpenXmlDocumentTOF cmdlet creates a Table of Figures based on the figures found it in the document. The TOF will be created at the end of the document.


The Get-OpenXmlHeader retrieves all the existing header parts from a document. The execution returns an XDocument array of all the header parts found in the document.

Attachment: Open XML Power
Leave a Comment
  • Please add 8 and 6 and type the answer here:
  • Post
  • Do you plan to use it with sdk 2?

Page 1 of 1 (1 items)