Range.InsertXML Method
Word Developer Reference |
Inserts the specified XML into the document at the specified range, replacing any text contained within the range.
Syntax
expression.InsertXML(XML, Transform)
expression An expression that returns a Range object.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
XML | Required | String | Specifies the XML to insert. This can be any valid custom XML. |
Transform | Optional | Variant | Specifies the XML Transformation (XSLT) used to transform the XML. If omitted, the XML is inserted as custom XML without applying a transform. |
Return Value
Nothing
Example
The following example inserts the specified XML string into the document at the fifth paragraph. This replaces any text contained within the fifth paragraph.
Visual Basic for Applications |
---|
|
See Also