How to: Add XMLNodes Controls to Word Documents
Important The information set out in this topic regarding Microsoft Word is presented exclusively for the benefit and use of individuals and organizations who are located outside the United States and its territories or who are using, or developing programs that run on, Microsoft Word products that were licensed by Microsoft before January 2010, when Microsoft removed an implementation of particular functionality related to custom XML from Microsoft Word. This information regarding Microsoft Word may not be read or used by individuals or organizations in the United States or its territories who are using, or developing programs that run on, Microsoft Word products that were licensed by Microsoft after January 10, 2010; those products will not behave the same as products licensed before that date or purchased and licensed for use outside the United States.
Applies to: The information in this topic applies to document-level projects for Word 2007 and Word 2010. For more information, see Features Available by Office Application and Project Type.
When you map a repeating XML schema element to a Microsoft Office Word document, Visual Studio automatically adds an XMLNodes control to your document.
For information about mapping non-repeating XML schema elements, see How to: Add XMLNode Controls to Word Documents.
The XMLNodes control is not available from the Toolbox or the Data Sources window, nor can it be created programmatically.
Your computer might show different names or locations for some of the Visual Studio user interface elements in the following instructions. The Visual Studio edition that you have and the settings that you use determine these elements. For more information, see Visual Studio Settings.
To add an XMLNodes control to a document
In the document in the Visual Studio designer, on the Ribbon, click the Developer tab.
If the Developer tab is not visible, you must first show it. For more information, see How to: Show the Developer Tab on the Ribbon.
In the XML group, click Schema.
The Templates and Add-ins dialog box opens.
Click the XML Schema tab.
Click Add Schema.
The Add Schema dialog box opens.
Select an XML schema that contains repeating schema elements and click Open.
The Schema Settings dialog box appears.
Assign an alias or click OK to add the schema without an alias.
The schema is added to the Add Schema dialog box.
In the Add Schema dialog box, click OK.
The XML Structure task pane opens.
Click the repeating schema element on the XML Structure task pane to add it to the document.
An XMLNodes control is created and added to the project.