XSLTransform Object (Word)

Represents a single registered Extensible Stylesheet Language Transformation (XSLT).

Use the Add method of the XSLTransforms collection to add an individual XSLT to the list of XSLTs available for a schema. The following example adds the simplesample.xslt transformation to the XSLTs for the SimpleSample schema.

Sub AddXSLT() 
 Dim objSchema As XMLNamespace 
 Dim objTransform As XSLTransform 
 Set objSchema = Application.XMLNamespaces("SimpleSample") 
 Set objTransform = objSchema.XSLTransforms _ 
End Sub

Use the Item method of the XSLTransforms collection to return a single XSLTransform object. The following example deletes the first XSLT in the collection of XSLTs for the SimpleSample schema.

Sub DeleteTransform() 
 Dim objXSLT As XSLTransform 
 Dim intResponse As Integer 
 Set objXSLT = Application.XMLNamespaces("SimpleSample") _ 
 intResponse = MsgBox("Are you sure you want to delete the " _ 
 & objXSLT.Alias & " XSLT?", vbYesNo) 
 If intResponse = vbYes Then objXSLT.Delete 
End Sub
Note Note

The SimpleSample schema is included in the Smart Document Software Development Kit (SDK). For more information, refer to the Smart Document SDK on the Microsoft Developer Network (MSDN) Web site.

© 2015 Microsoft