This file contains code snippets for use with the following exercises from Chapter 22:
- Create a Word document from scratch
- Ribbon customization
- Binding Custom XML data to content controls
You can also find code snippets for use with exercise on adding a macro to the Ribbon from chapter 23. The Chapter 23 code is at the end of this file. Note that this file contains the XML code only and not the related VBA macro.
****************************************
When copying code, be sure to select all characters, including outside angle brackets, for the applicable code -- but do NOT select any characters beyond the code snippet (such as extra hard returns or the asterisks or underscores used here to divide the code snippets for ease of reference.)
****************************************
Create a document from scratch
________________________________________
document.xml
****************************************
This is the first Word document I've created from scratch.
[Content_Types].xml
****************************************
.rels
****************************************
Ribbon customization
_________________________________________
CustomUI.xml
*****************************************
.rels
(IMPOTANT: REMEMBER TO REPLACE THE # in the code below with an rID number not already in use in the file!!!)
*****************************************
Data Binding
_________________________________________
item1.xml
*****************************************
My e-mail addressAdd a favorite saying here.
itemProps1.xml
*****************************************
item1.xml.rels
*****************************************
data binding code to add to document.xml for binding the first control
(IMPORTANT: If you change the GUID in the itemProps1.xml file, change it here as well)
*****************************************
relationship to add to document.xml.rels
(IMPOTANT: REMEMBER TO REPLACE THE # in the code below with an rID number not already in use in the file!!!)
*****************************************
Adding a macro to the Ribbon - from Chapter 23
_________________________________________
CustomUI.xml
*****************************************
.rels
(IMPOTANT: REMEMBER TO REPLACE THE # in the code below with an rID number not already in use in the file!!!)
*****************************************