Range.InsertXML (Word)

Inserts the specified XML into the document at the specified range, replacing any text contained within the range.

InsertXML (XML, Transform)


Dim strXML As String 
 
strXML = "<"xml version=""1.0"">" & _ 
 "Matt HinkMigration Paths of the Red " & _ 
 "Breasted Robinnon-fiction" & _ 
 "29.952006-05-01" & _ 
 "You see them in the spring outside your windows. " & _ 
 "You hear their lovely songs wafting in the warm spring air. " & _ 
 "Now follow their path as they migrate to warmer climes in the fall, " & _ 
 "and then back to your back yard in the spring." 
 
ActiveDocument.Paragraphs(5).Range.InsertXML strXML

Arguments

The following argument is required

XML (String) - Specifies the XML to insert. This can be any valid custom XML.

Optional arguments

The following argument is optional

Transform (String) - Specifies the XML Transformation (XSLT) used to transform the XML. If omitted, the XML is inserted as custom XML without applying a transform.