Document.XMLSaveThroughXSLT Property (Word)

Office 2013 and later

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Sets or returns a String that specifies the path and file name for the Extensible Stylesheet Language Transformation (XSLT) to apply when a user saves a document.

expression .XMLSaveThroughXSLT

expression An expression that returns a Document object.

The XMLSaveThroughXSLT property is only applicable when the XMLUseXSLTWhenSaving property is set to True. If the XMLUseXSLTWhenSaving property is set to False, Microsoft Word will ignore the XMLSaveThroughXSLT property.

The following example specifies that Word will use an XSLT when saving the active document, and then it specifies which XSLT to use.

ActiveDocument.XMLUseXSLTWhenSaving = True 
ActiveDocument.XMLSaveThroughXSLT = "c:\schemas\book.xsl"