How to: Map Schemas to Word Documents Inside Visual Studio
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 2013 and Word 2010. For more information, see Features Available by Office Application and Project Type.
You can map an XML schema to a document while the document is open in Visual Studio. You use the same Microsoft Office Word tools that you use when the document is open outside of Visual Studio. The Office project creates the same objects whether you map the schema to the document before or after you create your Word solution.
To map an XML schema to a Word document in Visual Studio
Open the Word document or template project inside Visual Studio.
Click in the document to move the focus to the designer.
On the Ribbon, click the Developer tab.
Note
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.
Browse to your schema file, select it, and then click Open.
The Schema Settings dialog box opens.
Assign an alias or click OK to add the schema without an alias.
Click OK.
The XML Structure window opens.
Drag elements from the XML Structure window to the places in your document where you want the corresponding controls to be created.
See Also
Tasks
How to: Map Schemas to Worksheets Inside Visual Studio