Is there any way to bind ordered lists to XML documents in MS Word?
Currently I have xml such as:
<?xml version="1.0"?>
<myvars>
<name>foo</name>
</myvars>
Then I load and map it to a contentcontrol:
ActiveDocument.CustomXMLParts.Add
ActiveDocument.CustomXMLParts(5).Load ("c:\test.xml")
Dim strXPath1 As String
strXPath1 = "/myvars/name"
ActiveDocument.ContentControls(1).XMLMapping.SetMapping strXPath1
However this is only useful for single texts. Is there anyway to map xml enteries to ordered lists? For example:
<?xml version="1.0"?>
<myvars>
<person>
<name>foo</name>
<alias>bar</alias>
<alias>chew</alias>
</person>
<person>
<name>alpha</name>
<alias>bravo</alias>
<alias>charlie</alias>
</person>
</myvars>
mapped into the word document so that it shows up as ordered lists:
1. foo
a. bar
b. chew
2. alpha
a. bravo
b. charlie
Basically, the answer is you cannot. You can only map simple text and combo box type content controls to XML.