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
Expand Minimize

Selection.InsertXML Method

Inserts the specified XML text into the specified selection.

Namespace:  Microsoft.Office.Interop.Word
Assembly:  Microsoft.Office.Interop.Word (in Microsoft.Office.Interop.Word.dll)

void InsertXML(
	string XML,
	ref Object Transform
)

Parameters

XML
Type: System.String
Required String. The XML text to insert.
Transform
Type: System.Object%
Optional Object. The transform to apply to the inserted XML text.

If the specified range or selection contains text, the InsertXML method replaces the existing text.

Use the InsertXML method to insert text marked up with either arbitrary XML or Word XML. The XML must be well formed. If it uses Word XML, then it must also be valid according to the Word XML schema. For more information on the Word XML schema, please refer to the Word XML Content Development Kit, which you can find on the Microsoft Developer Network (MSDN) Web site.

If the specified XML text cannot be inserted into the specified range or selection, an error message is displayed.

Community Additions

ADD
Show:
© 2015 Microsoft