1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492
|
<html dir="ltr"><head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<META HTTP-EQUIV="assetid" CONTENT="HV01151865"><META NAME="lcid" CONTENT="1033"><title>Using WordprocessingML</title><link rel="stylesheet" type="text/css" href="office10.css"><script type="text/javascript" language="Javascript" src="ExpCollapse.js"></script><script type="text/javascript" language="JavaScript" src="inline.js"></script></head><body><h1>Using WordprocessingML</h1><p>This document describes the elements in the WordprocessingML Schema that are important to document developers and to application developers whose programs will read and write WordprocessingML documents. The text assumes that you have a basic understanding of XML 1.0, XML namespaces, and the functionality of Microsoft® Office Word. Each major section of this document introduces new features of the language and describes those features in the context of concrete examples.</p><p>In this document, you'll see how to:</p><ul>
<li>Create a document with typical Word structures (paragraphs and sections)</li>
<li>Add typical document components, including lists, tables, headers, footers, and title pages</li>
<li>Format your documents by specifying formatting at any level within the document</li>
<li>Define and use styles</li>
<li>Insert graphics, bookmarks, hyperlinks, and fields into your document</li>
</ul><p>Following this introduction to WordprocessingML is a reference to the WordprocessingML elements that are most useful to developers.</p><h3>Structure of This Document</h3><p>After an initial overview of WordprocessingML and document-level properties and information, this white paper looks at WordprocessingML topics in the order that developers will presumably need them. This structure means that some elements are not discussed in detail in one location. For instance, the <b class="bterm">documentProperties</b> element contains elements that affect how fields and headers are handled. As a result, the child elements of the <b class="bterm">documentProperties</b> element are discussed in two different places in the document.</p><ul>
<li><b class="bterm">Section 1</b>: An overview of WordprocessingML that describes the simplest possible WordprocessingML document and a summary of the top-level WordprocessingML elements.</li>
<li><b class="bterm">Section 2</b>: Adding content to WordprocessingML document as unformatted text.</li>
<li><b class="bterm">Section 3</b>: Formatting text, including defining and using styles.</li>
<li><b class="bterm">Section 4</b>: Adding additional components to documents including lists, tables, headers, and footers. Also covered in this section are the document information and properties sections.</li>
<li><b class="bterm">Section 5</b>: Other topics: bookmarks, hyperlinks, fields.</li>
<li><b class="bterm">Section 6</b>: The auxiliary elements added by Word to a WordprocessingML document to provide information about the document.</li>
<li><b class="bterm">Reference</b>: Tables that list and describe the WordprocessingML elements.</li>
</ul><h2>Section 1: WordprocessingML Overview</h2><h3>Top-Level Elements, Namespace, Basic Document Structure</h3><p>The top-level elements in a WordprocessingML document are:</p><ul>
<li>Document information (<b class="bterm">documentProperties</b> element)</li>
<li>Font information (<b class="bterm">fonts</b> element)</li>
<li>List-style definitions (<b class="bterm">lists</b> element)</li>
<li>Style definitions (<b class="bterm">styles</b> element)</li>
<li>Drawing defaults (<b class="bterm">shapeDefaults</b> element)</li>
</ul><p><b class="bterm">docSuppData</b> element (Microsoft Visual Basic® for Applications [VBA] code)</p><ul>
<li>Document options (<b class="bterm">docPr</b> element)</li>
<li>The document's content (<b class="bterm">body</b> element)</li>
</ul><p>However, the simplest Word document consists of just five elements (and a single namespace). The five elements are:</p><ul>
<li><b class="bterm">wordDocument</b>: <b class="bterm"></b>The root element for a WordprocessingML document.</li>
<li><b class="bterm">body</b>: <b class="bterm"></b>The container for the displayable text.</li>
<li><b class="bterm">p</b>: <b class="bterm"></b>A paragraph.</li>
<li><b class="bterm">r</b>: <b class="bterm"></b>A contiguous set of WordprocessingML components with a consistent set of properties.</li>
<li><b class="bterm">t</b>: <b class="bterm"></b>A piece of text.</li>
</ul><p>The namespace for the root WordprocessingML Schema (also known as the XML Document 2003 Schema) is "http://schemas.microsoft.com/office/word/2003/wordml". This namespace is normally associated with the WordprocessingML elements by using a prefix of "w." The simplest possible WordprocessingML document looks like this:</p><pre>
<code><?xml version="1.0"?>
<w:wordDocument
xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml">
<w:body>
<w:p>
<w:r>
<w:t>Hello, World.</w:t>
</w:r>
</w:p>
</w:body>
</w:wordDocument>
</code>
</pre><p>In Figure 1, you can see the resulting document, displayed in Microsoft Office Word.</p><img border="0" src="../img/WordPro001_ZA01152107.gif" alt=""><p><b class="bterm">Figure 1. A WordprocessingML document in Microsoft Office Word</b></p><h3>Tying the Document to Microsoft Office Word</h3><p>If you save a Word document with the .xml extension, Windows will treat the file like any other XML file. Double-clicking the file, for instance, will open it in the standard XML processor (usually Microsoft Internet Explorer). However, adding the <code>mso-application</code> processing instruction specifies Word as the preferred application for processing the file. As a result, Word will open the XML document when the user double-clicks the document's icon. This example shows the sample document with the <code>mso-application</code> element added:</p><pre>
<code><?xml version="1.0"?>
<?mso-application progid="Word.Document"?>
<w:wordDocument
xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml">
<w:body>
<w:p>
<w:r>
<w:t>Hello, World.</w:t>
</w:r>
</w:p>
</w:body>
</w:wordDocument>
</code>
</pre><p>A side effect of this automatic behavior, however, is that it prevents the display in Internet Explorer of the XML markup of XML files saved by Word. You can temporarily disable this behavior by deleting the following registry entry and value</p><p><b class="bterm">Word.Document</b> = "application/msword"</p><p>from the following subkey:</p><p><b class="bterm">HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\11.0\Common\</b></p><p><b class="bterm">Filter\text/xml</b></p><h2>Section 2: Adding Text to the Document</h2><p>The document's content is held in the <b class="bterm">body</b> element. Text within the <b class="bterm">body</b> element is kept in a nested set of three elements: <b class="bterm">t</b> (a piece of text), <b class="bterm">r</b> (a run of text within a paragraph), and <b class="bterm">p</b> (a paragraph).</p><h3>The t (Text), r (Run), and p (Paragraph) Elements</h3><p>The lowest level of this hierarchy is the <b class="bterm">t</b> element, which is the container for the text that makes up the document's content. You can put as much text as you want in a <b class="bterm">t</b> element<nbsp />— up to and including all your document's content. However, in most WordprocessingML documents, long runs of text will be broken up into paragraphs and strings with different formats, or be interrupted by line breaks, graphics, tables, and other items in a Word document.</p><p>A <b class="bterm">t</b> element must be enclosed by an <b class="bterm">r</b> element<nbsp />— a run of text. An <b class="bterm">r</b> element can contain multiple occurrences of <b class="bterm">t</b> elements, among other elements. The <b class="bterm">r</b> element allows the WordprocessingML author to combine breaks, styles and other components but apply the same characteristics to all the parts of the run. All of the elements inside an <b class="bterm">r</b> element have their properties controlled by the <b class="bterm">rPr</b> element (for run properties), which is the first child of the of the <b class="bterm">r</b> element. The <b class="bterm">rPr</b> element, in turn, is a container for a set of property elements that are applied to the rest of the children of the <b class="bterm">r</b> element. The elements inside the <b class="bterm">rPr</b> container element allow you to control, among other options, whether the text in the following <b class="bterm">t</b> elements is bold, underlined, or visible.</p><h3>Sections</h3><p>In a WordprocessingML document, the layout of the page that your text appears in is controlled by the properties for that section of the document. However, there is no container element for sections in WordprocessingML. Instead, the information about a section is kept inside a <b class="bterm">sectPr</b> (section properties) element that appears at the end of each section. Though a <b class="bterm">sectPr</b> element isn't necessary in a WordprocessingML document, Word always inserts a <b class="bterm">sectPr</b> element at the end of any new document that it creates. Here is a typical <b class="bterm">sectPr</b> element generated by Word when a document is created:</p><pre>
<code><w:sectPr>
<w:pgSz w:w="12240" w:h="15840"/>
<w:pgMar w:top="1440" w:right="1800" w:bottom="1440" w:left="1800"
w:header="720" w:footer="720" w:gutter="0"/>
<w:cols w:space="720"/>
<w:docGrid w:line-pitch="360"/>
</w:sectPr>
</code>
</pre><p>When new sections are added to a WordprocessingML document, the new <b class="bterm">sectPr</b> elements must appear inside <b class="bterm">pPr</b> elements (which are discussed later) inside <b class="bterm">p</b> elements. This example shows a <b class="bterm">sectPr</b> element added to a document to mark the end of a section:</p><pre>
<code><w:p>
<w:pPr>
<w:sectPr>
<w:pgSz w:w="6120" w:h="7420" />
<w:pgMar w:top="720" w:right="720" w:bottom="720"
w:left="720" w:header="0" w:footer="0" w:gutter="0" />
</w:sectPr>
</w:pPr>
</w:p>
</code>
</pre><p>Each <b class="bterm">sectPr</b> element marks the end of a section and the start of a new section. The child elements of the <b class="bterm">sectPr</b> element provide the definition of the section just ended. All the child elements for the <b class="bterm">sectPr</b> element are listed in Table 4.</p><p>While WordprocessingML does not have a container for sections, Word does generate <b class="bterm">sect</b> elements that act as containers for sections. These are not part of WordprocessingML but belong to the Auxiliary XML Document 2003 namespace ("http://schemas.microsoft.com/office/word/2003/auxHint"). The <b class="bterm">sect</b> elements (and other auxiliary elements) are discussed later in this document.</p><h3>Organizing Text</h3><p>The following example has multiple <b class="bterm">t</b> elements inside an <b class="bterm">r</b> element (for the following examples, only the <b class="bterm">body</b> element and its children are shown):</p><pre>
<code><w:body>
<w:p>
<w:r>
<w:t>Hello, World.</w:t>
<w:t> How are you, today?</w:t>
</w:r>
</w:p>
</w:body>
</code>
</pre><p>Although this document is valid, duplicating the <b class="bterm">t</b> element isn't necessary. Therefore, the following example would give the same result as the previous one:</p><pre>
<code><w:body>
<w:p>
<w:r>
<w:t>Hello, World. How are you, today?</w:t>
</w:r>
</w:p>
</w:body>
</code>
</pre><h3>Inserting Breaks</h3><p>Typically, if you have multiple <b class="bterm">t</b> elements in an <b class="bterm">r</b> element, it's because you need to insert some other element in between the pieces of text. In the following example, a <b class="bterm">br</b> element appears between the two <b class="bterm">t</b> elements. The <b class="bterm">br</b> element will force the second <b class="bterm">t</b> element to a new line when the text is displayed in Word:</p><pre>
<code><w:body>
<w:p>
<w:r>
<w:t>Hello, World. </w:t>
<w:br w:type="text-wrapping"/>
<w:t>How are you, today?</w:t>
</w:r>
</w:p>
</w:body>
</code>
</pre><p>The <b class="bterm">br</b> element's <b class="bterm">type</b> attribute allows you to specify the kind of break ("page", "column", "text-wrapping"). Because the default is "text-wrapping" (a new line), the <b class="bterm">type</b> attribute in the previous example could have been omitted. Figure 2 shows the results of using a <b class="bterm">br</b> element between <b class="bterm">r</b> elements.</p><img border="0" src="../img/WordPro002_ZA01152108.gif" alt=""><p><b class="bterm">Figure 2. A Word document with a br element between t elements</b></p><h3>Creating Paragraphs</h3><p>You use <b class="bterm">p</b> elements to define new paragraphs (a <b class="bterm">br</b> element with text-wrapping is equivalent to the "soft break" in Word that's created by pressing SHIFT+ENTER and doesn't start a new paragraph). A WordprocessingML document with text in two separate paragraphs would look like this:</p><pre>
<code><w:body>
<w:p>
<w:r>
<w:t>Hello, World.</w:t>
</w:r>
</w:p>
<w:p>
<w:r>
<w:t>How are you, today?</w:t>
</w:r>
</w:p>
</w:body>
</code>
</pre><p>The resulting document can be seen in Figure 3. As comparing Figures 2 and 3 shows, depending on your formatting options, the difference between using <b class="bterm">br</b> elements and <b class="bterm">p</b> elements may not be visible. The display of a WordprocessingML document in Word may not reveal the underlying structure of the document.</p><img border="0" src="../img/WordPro003_ZA01152109.gif" alt=""><p><b class="bterm">Figure 3. A Word document with multiple p elements</b></p><h3>Tabs</h3><p>The <b class="bterm">tab</b> element allows you to position text horizontally on a line. <b class="bterm">Tab</b> elements move the following text to the next tab stop. Exactly where on the line that will be depends on how tab stops are defined in the document.</p><p>In this example, the text will appear on a single line but with each <b class="bterm">t</b> element's text positioned at a separate tab stop:</p><pre>
<code><w:p>
<w:r>
<w:tab/>
<w:t>Hello, World.</w:t>
</w:r>
<w:r>
<w:tab/>
<w:t>How are you, today?</w:t>
</w:r>
</w:p>
</code>
</pre><p>Tab stops are defined in the <b class="bterm">pPr</b> element, which is also a child of the <b class="bterm">p</b> element. Within the <b class="bterm">pPr</b> element, you can set the tab stops for the paragraph by using <b class="bterm">tab</b> elements with the <b class="bterm">tabs</b> element. Three attributes on the <b class="bterm">tab</b> element define the tab stop:</p><ul>
<li><b class="bterm">val</b>: The type of tab.</li>
<li><b class="bterm">pos</b>: The tab's position from the left edge of the document, in twips.</li>
<li><b class="bterm">leader</b>: The text to fill the empty space between tab stops.</li>
</ul><p>For example, this paragraph has three tab stops at 1 inch (1,440 twips), 3 inches (4,320 twips), and 5 inches (7,200 twips), with each tab stop being a different type. In the example, the <b class="bterm">tab</b> elements before the <b class="bterm">r</b> element move the text to the second tab stop:</p><pre>
<code><w:p>
<w:pPr>
<w:tabs>
<w:tab w:val ="center" w:pos="1440"/>
<w:tab w:val="left" w:pos="4320"/>
<w:tab w:val="decimal" w:pos="7200"/>
</w:tabs>
</w:pPr>
<w:r>
<w:tab/>
<w:tab/>
<w:t>Hello, World.</w:t>
</w:r>
</w:p>
</code>
</pre><p>Table 7 lists the attributes for the <b class="bterm">tab</b> element and the options that you can use.</p><h2>Section 3: Formatting Text</h2><p>The most powerful formatting tool discussed in this section is WordprocessingML styles. Although you can format your document by setting individual properties at the paragraph and run level, this approach may not be your best choice. If you're doing more than setting bold, underline, or italics for a single run, using styles to format your document makes it easier to manage the appearance of your document.</p><h3>Formatting Runs of Text</h3><p>The <b class="bterm">rPr</b> (run property) element is a container that holds the property elements that define how a run is to be treated by Word. Only one <b class="bterm">rPr</b> element is allowed within an <b class="bterm">r</b> element. Table 2 lists all of the elements that can be included inside the <b class="bterm">rPr</b> element with their description (taken from the WordprocessingML schema).</p><p>Most the children of the <b class="bterm">rPr</b> element have a single <b class="bterm">val</b> attribute that is limited to a specific set of values. For instance, the <b class="bterm">b</b> (bold) element causes the text that follows it to be bold when the <b class="bterm">b</b> element has its <b class="bterm">val</b> attribute set to "on". In this example, both "Hello, World." and "How are you, today?" will be bold because both sets of text are in the same run and follow the <b class="bterm">rPr</b> element with the <b class="bterm">b</b> element.</p><p><b>Note</b> The prefix "w:" (which denotes the namespace) on the <b class="bterm">val</b> attribute is <i>not</i> optional.</p><pre>
<code><w:r>
<w:rPr>
<w:b w:val="on"/>
</w:rPr>
<w:t>Hello, World.</w:t>
<w:br/>
<w:t>How are you, today?</w:t>
</w:r>
</code>
</pre><p>Figure 4 shows the result of this change.</p><img border="0" src="../img/WordPro004_ZA01152110.gif" alt=""><p><b class="bterm">Figure 4. Text in an r element with the b element used in the rPr element</b></p><p>If the <b class="bterm">val</b> attribute isn't present for the <b class="bterm">b</b> element, it defaults to "on". Therefore, the element <w:b/> is equivalent to the element <w:b w:val=""on"/>.</p><p>If the style applied to a run (or a paragraph) has the bold property turned on, you can suppress the bold formatting by setting the <b class="bterm">val</b> attribute to "off" like this:</p><pre>
<code><w:r>
<w:rPr>
<w:b w:val="off"/>
</w:rPr>
<w:t>Hello, World.</w:t>
<w:t>How are you, today?</w:t>
</w:r>
</code>
</pre><p>While most <b class="bterm">rPr</b> elements use just the <b class="bterm">val</b> attribute, there are exceptions (the <b class="bterm">asianLayout</b> property, for instance, takes several attributes). Table 2 provides the values for the <b class="bterm">val</b> attribute for each of the <b class="bterm">rPr</b> properties, provided that the list of values is short. Where the element has multiple attributes, doesn't use the <b class="bterm">val</b> attribute, or has a large number of values, the table gives the name of the type definition in the WordprocessingML schema that describes the element.</p><p>For example, the <b class="bterm">underline</b> element uses the <b class="bterm">val</b> attribute but offers more choices than "on" and "off". This example gives the text a single, continuous underline (other options include "words", "double", and "thick"):</p><pre>
<code><w:r>
<w:rPr>
<w:u w:val="single"/>
</w:rPr>
<w:t>How are you today?</w:t>
</w:r>
</code>
</pre><p>The result appears in Figure 5.</p><img border="0" src="../img/WordPro005_ZA01152111.gif" alt=""><p><b class="bterm">Figure 5. Applying the u element to text</b></p><h3>Formatting Paragraphs</h3><p>The <b class="bterm">pPr</b> element defines the properties for a paragraph. Table 3 lists the permitted child elements. For example, within the <b class="bterm">pPr</b> element, the <b class="bterm">jc</b> element is used to control the paragraph's alignment. In this document, the text in the paragraph will be centered (see Figure 6):</p><pre>
<code><w:p>
<w:pPr>
<w:jc w:val="center"/>
</w:pPr>
<w:r>
<w:t>Hello, World.</w:t>
<w:br/>
<w:t>How are you, today?</w:t>
</w:r>
</w:p>
</code>
</pre><img border="0" src="../img/WordPro006_ZA01152112.gif" alt=""><p><b class="bterm">Figure 6. Centered text</b></p><h3>Styles</h3><p>Styles allow you to create a group of style properties that can be applied as a unit either to individual paragraphs (within the <b class="bterm">pPr</b> element) or runs (within the <b class="bterm">rPr</b> element). Styles reduce the amount of WordprocessingML text that you have to produce and the amount of work required to make changes to your document's appearance. With styles, changing the appearance of all the pieces of text that share a common style has to be done in only one place: the style definition.</p><h4>Using Styles</h4><p>The <b class="bterm">pStyle</b> element inside the <b class="bterm">pPr</b> element specifies which style is to be used for all runs in the paragraph. In the <b class="bterm">rPr</b> elements, the <b class="bterm">rStyle</b> element specifies the style for individual runs. The text inside the <b class="bterm">t</b> elements will reflect a merging of the styles set at the <b class="bterm">pPr</b> and set at the <b class="bterm">rPr</b> level. There are no child elements in common between the <b class="bterm">pPr</b> and <b class="bterm">rPr</b> elements, so merging the two property sets is straightforward.</p><p>In this example:</p><ul>
<li>The style "MyStyle" sets the paragraph-level properties.</li>
<li>"MyFirstRunStyle" sets the run-level properties for the text in the first <b class="bterm">t</b> element.</li>
<li>"MySecondRunStyle" sets the run-level properties for the text in the second <b class="bterm">t</b> element.</li>
</ul><pre>
<code><w:body>
<w:p>
<w:pPr>
<w:pStyle w:val="MyStyle"/>
</w:pPr>
<w:r>
<w:rPr>
<w:rStyle w:val="MyFirstRunStyle"/>
</w:rPr>
<w:t>Hello, World.</w:t>
</w:r>
<w:r>
<w:rPr>
<w:rStyle w:val="MySecondRunStyle"/>
</w:rPr>
<w:t>How are you, today?</w:t>
</w:r>
</w:p>
</w:body>
</code>
</pre><h4>Defining Styles</h4><p>Styles are defined in the WordprocessingML <b class="bterm">styles</b> element, which is a top-level element under the <b class="bterm">wordDocument</b> element. Within the <b class="bterm">styles</b> element, each <b class="bterm">style</b> element defines a single style. A <b class="bterm">style</b> element is a container element for elements that define the style (all the children for the <b class="bterm">style</b> element are listed in Table 6).</p><p>The <b class="bterm">style</b> element itself takes three attributes: <b class="bterm">type</b>, <b class="bterm">styleId</b>, and <b class="bterm">default</b>:</p><p>The <b class="bterm">type</b> attribute allows you to indicate what kind of style you're defining: paragraph, character, table, or list. Styles used in the <b class="bterm">pPr</b> element must be paragraph styles; styles in the <b class="bterm">rPr</b> element must be character styles.</p><p>The <b class="bterm">styleId</b> attribute gives your style the name that you use to invoke the style in your WordprocessingML document.</p><p>When the <b class="bterm">default</b> attribute is set to "on," it indicates that this style is the default style for a particular type of style: paragraph, character, table, and list.</p><p>In the following example, three styles are defined:</p><ul>
<li>"MyParagraphStyle," which is a paragraph style and is specified as the default style for paragraphs.</li>
<li>"AnotherParagraph," which is also a paragraph style.</li>
<li>"EmphasisStyle," which is a character style.</li>
</ul><pre>
<code><w:styles>
<w:style w:type="paragraph" w:styleId="MyParagraphStyle"
w:default="on"/>
<w:style w:type="paragraph" w:styleId="AnotherParagraph"
w:default="off"/>
<w:style w:type="character" w:styleId="EmphasisStyle"
w:default="off"/>
</w:styles>
</code>
</pre><p>The following sample applies those styles. "AnotherStyle" is used for the first paragraph in the document. In the second paragraph, no paragraph style is specified, so the second paragraph will be formatted using the default style ("MyParagraphStyle"). However, within the <b class="bterm">r</b> element in the second paragraph, a character style is used to control the appearance of the text:</p><pre>
<code><w:body>
<w:p>
<w:pPr>
<w:pStyle w:val="AnotherParagraph"/>
</w:pPr>
<w:r>
<w:t>Hello, World.</w:t>
</w:r>
</w:p>
<w:p>
<w:r>
<w:rPr>
<w:rStyle w:val="Emphasis"/>
</w:rPr>
<w:t>How are you, today?</w:t>
</w:r>
</w:p>
</w:body>
</code>
</pre><h4>Extending Styles</h4><p>To create a style by extending another style, you use the <b class="bterm">basedOn</b> element. The <b class="bterm">basedOn</b> element allows you to create variations on a style by adding or overriding the properties of the base style. This example defines an "Italic" style and then uses it as the base for a "ItalicBold" style:</p><pre>
<code><w:styles>
<w:style w:type="paragraph" w:styleId="Italic" >
<w:rPr>
<w:i w:val="on"/>
</w:rPr>
</w:style>
<w:style w:type="paragraph" w:styleId="ItalicBold" >
<w:basedOn w:val="Italic"/>
<w:rPr>
<w:b w:val="on"/>
</w:rPr>
</w:style>
</w:styles>
<w:body>
<w:p>
<w:pPr>
<w:pStyle w:val="ItalicBold" />
</w:pPr>
<w:r>
<w:t>Hello, World.</w:t>
</w:r>
</w:p>
</w:body>
</code>
</pre><p>The order of the <b class="bterm">style</b> elements with the <b class="bterm">styles</b> element doesn't matter: a <b class="bterm">basedOn</b> style can extend <b class="bterm">style</b> elements that precede or follow it.</p><p>Other useful child elements of the <b class="bterm">style</b> element include:</p><ul>
<li><b class="bterm">name</b>: Establishes the name to be displayed in the <b class="bterm">Style</b> drop-down list in Word. Using the <b class="bterm">name</b> element along with the <b class="bterm">styleId</b> attribute allows you to use a terse name for the <b class="bterm">styleId</b> (thereby reducing the text in the WordprocessingML document) while presenting a more descriptive or friendly name to the Word user.</li>
<li><b class="bterm">locked</b>: Prevents users from redefining the style.</li>
<li><b class="bterm">hidden</b>: Prevents users from seeing a style.</li>
<li><b class="bterm">next</b>: Specifies the style to be used on the new paragraph created when the user presses the ENTER key at the end of the current paragraph.</li>
</ul><p>As a more comprehensive example, the following <b class="bterm">style</b> element establishes:</p><ul>
<li>A style called "ReferenceName".</li>
<li>In Word, the user will see the style called "DisplayName" in the <b class="bterm">Style</b> drop-down list.</li>
<li>The style is locked to prevent it from being redefined by the user.</li>
<li>When the user presses the ENTER key, the next paragraph will be in the "ItalicBold" style.</li>
<li>Although the <b class="bterm">hidden</b> element is used, its <b class="bterm">val</b> attribute is set to "off", so the style will be visible in Word (which is the default for this element).</li>
</ul><pre>
<code><w:style w:type="paragraph" w:styleId="ReferenceName" >
<w:name w:val="DisplayName" />
<w:locked w:val="on" />
<w:hidden w:val="off"/>
<w:next w:val="ItalicBold"/>
<w:rPr>
<w:i w:val="on"/>
</w:rPr>
</w:style>
</code>
</pre><p>This paragraph uses the style just defined, by setting the <b class="bterm">val</b> attribute to the name specified in the style's <b class="bterm">styleId</b> attribute:</p><pre>
<code><w:p>
<w:pPr>
<w:pStyle w:val="ReferenceName"/>
</w:pPr>
<w:r>
<w:t>Hello, World</w:t>
</w:r>
</w:p>
</code>
</pre><p>Figure 7 shows the style applied to the first paragraph in the document. On the <b class="bterm">Formatting</b> toolbar in Word, the <b class="bterm">Style</b> drop-down list shows the name established for the style through the <b class="bterm">name</b> element in the <b class="bterm">style</b> element. The second paragraph in Figure 7 was created by pressing the ENTER key at the end of the first paragraph and is in the "ItalicBold" style, as specified by the <b class="bterm">next</b> element.</p><img border="0" src="../img/WordPro007_ZA01152113.gif" alt=""><p><b class="bterm">Figure 7. The "DisplayName" style in use</b></p><h4>Style Properties</h4><p>You define a style by adding child elements to the <b class="bterm">style</b> elements (all of the children are listed in Table 6). Within the <b class="bterm">style</b> element, <b class="bterm">rPr</b> and <b class="bterm">pPr</b> elements allow you to define the formatting to be used at the <b class="bterm">r</b> and <b class="bterm">p</b> levels. The only limitation is that <b class="bterm">pPr</b> elements used in a character style are ignored (and, as mentioned before, you can only refer to paragraph styles within a <b class="bterm">pPr</b> element and only to character styles within an <b class="bterm">rPr</b> element).</p><p>Putting it all together, this document defines a style that sets the justification for the paragraph (in the <b class="bterm">pPr</b> element of the style) and combines bold and italic (in the <b class="bterm">rPr</b> element of the style). The style is then used to format a paragraph:</p><pre>
<code><w:styles>
<w:style w:type="paragraph" w:styleId="ItalicBold">
<w:pPr>
<w:jc w:val="center"/>
</w:pPr>
<w:rPr>
<w:i w:val="on"/>
<w:b w:val="on"/>
</w:rPr>
</w:style>
</w:styles>
<w:body>
<w:p>
<w:pPr>
<w:pStyle w:val="ItalicBold" />
</w:pPr>
<w:r>
<w:t>Hello, World.</w:t>
</w:r>
</w:p>
</w:body>
</code>
</pre><p>The result of applying this paragraph style using the <b class="bterm">pPr</b> element inside the <b class="bterm">body</b> element is that the text will be italic, bold, and centered.</p><p>If you violate the restrictions that Word puts on using styles, Word won't raise an error but Word also won't apply your styles. Consider this example, which is similar to the previous example but has some key changes that prevent the style from being applied:</p><pre>
<code><w:styles>
<w:style w:type="character" w:styleId="ItalicBold" >
<w:pPr>
<w:jc w:val="center"/>
</w:pPr>
<w:rPr>
<w:i w:val="on"/>
<w:b w:val="on"/>
</w:rPr>
</w:style>
</w:styles>
<w:body>
<w:p>
<w:pPr>
<w:pStyle w:val="ItalicBold" />
</w:pPr>
<w:r>
<w:t>Hello, World.</w:t>
</w:r>
</w:p>
</w:body>
</code>
</pre><p>In this example, the "ItalicBold" style has its <b class="bterm">type</b> attribute set to <b class="bterm">character</b>. The result is that Word will ignore the use of the style in the <b class="bterm">pPr</b> element inside the <b class="bterm">body</b> element.</p><p>In this example, the character version of the style is used correctly inside the <b class="bterm">rPr</b> element but the result will still not reflect all of the settings made in the "ItalicBold" style:</p><pre>
<code><w:body>
<w:p>
<w:r>
<w:rPr>
<w:rStyle w:val="ItalicBold" />
</w:rPr>
<w:t>Hello, World.</w:t>
</w:r>
</w:p>
</w:body>
</code>
</pre><p>Because the style is specified as being a character style, the <b class="bterm">pPr</b> element in the style definition (where the center justification is specified) will be ignored. The <b class="bterm">rPr</b> element inside the style is applied, though. As a result, the text will be bold and italic but not centered.</p><p>You could also make text centered, bold, and italic by making the "ItalicBold" style the default paragraph style and by not specifying a style at the paragraph level:</p><pre>
<code><w:styles>
<w:style w:type="paragraph" w:styleId="ItalicBold"
w:default="on">
<w:pPr>
<w:jc w:val="center"/>
</w:pPr>
<w:rPr>
<w:i w:val="on"/>
<w:b w:val="on"/>
</w:rPr>
</w:style>
</w:styles>
<w:body>
<w:p>
<w:r>
<w:t>Hello, World.</w:t>
</w:r>
</w:p>
</w:body>
</code>
</pre><h4>Property Conflicts</h4><p>Because properties can be set at the <b class="bterm">style</b>, <b class="bterm">p</b>, and <b class="bterm">r</b> element levels, Word must deal with conflicts between the three levels. In this example, for instance, Word must reconcile:</p><ul>
<li>The bold setting in the <b class="bterm">rPr</b> element before the text.</li>
<li>Any bold setting that might be made in the character style, "MyFirstRunStyle".</li>
<li>Any bold setting made in the paragraph style, "MyStyle".</li>
<li>Finally, if no character or paragraph styles are explicitly specified, Word must deal with any bold setting made in the default character or paragraph styles:</li>
</ul><pre>
<code><w:body>
<w:p>
<w:pPr>
<w:pStyle w:val="MyStyle"/>
</w:pPr>
<w:r>
<w:rPr>
<w:rStyle w:val="MyFirstRunStyle"/>
<w:b w:val="on"/>
</w:rPr>
<w:t>Hello, World.</w:t>
</w:r>
</w:p>
</w:body>
</code>
</pre><p>Three rules are used to reconcile settings for properties that are either "on" or "off":</p><ul>
<li>The local setting controls the text: settings made in the <b class="bterm">rPr</b> or <b class="bterm">pPr</b> elements for the run override any settings made in a style.</li>
<li>When styles are applied using the <b class="bterm">pStyle</b> or <b class="bterm">rStyle</b> elements, if either of the styles turns on the feature, then the feature is turned on.</li>
<li>The setting in the default style is only relevant if no explicit style is applied to the text and no local setting is made.</li>
</ul><p>Applying the rules to the previous example, the text "Hello, World" will be bold because of the <b class="bterm">b</b> element in the <b class="bterm">rPr</b> element of the run. If the <b class="bterm">b</b> element hadn't been used in the <b class="bterm">rPr</b> element, then if either "MyStyle" or "MyFirstRunStyle" turned on bold formatting, the text would be bold<nbsp />— even if one of the styles turned bold off. Finally, any bold setting in a default paragraph or character style would apply only if no style was applied to the text.</p><h3>Fonts</h3><p>WordprocessingML provides two separate kinds of support for fonts:</p><ul>
<li>Providing Word with information about the fonts used in the document.</li>
<li>Controlling the font used to display the text in the document.</li>
</ul><h4>Specifying Fonts</h4><p>You can specify which fonts are used in your document by using the <b class="bterm">fonts</b> element. For each font that you use, you can specify a variety of properties that allow Word to manage the document's fonts and make appropriate substitutions when the requested font isn't available. Setting these properties requires an understanding of font information that's beyond the scope of this document. The <b class="bterm">fonts</b> element has no direct effect on your document's appearance but is simply a place to supply Word with information about the fonts used by the document.</p><h4>Using Fonts</h4><p>Within the <b class="bterm">fonts</b> element, the <b class="bterm">defaultFont</b> element specifies the default fonts for the document. This element directly controls which font is to be used to display the text in the document (unless overridden by a style or an <b class="bterm">rPr</b> child element).The <b class="bterm">defaultFont</b> element has a set of attributes that let you specify the default fonts for four character sets: <b class="bterm">ascii</b>, <b class="bterm">fareast</b>, <b class="bterm">h-ansi</b>, and <b class="bterm">cs</b> (complex scripts, for example, those scripts that allow bidirectional rendering). The <b class="bterm">defaultFont</b> element is one of the elements that control what font is to be used in displaying the document.</p><p>You can override the default font by using the <b class="bterm">rFonts</b> element in the <b class="bterm">rPr</b> element. This can be done either in the <b class="bterm">rPr</b> element preceding the <b class="bterm">t</b> element with the text, in an <b class="bterm">rPr</b> element inside a <b class="bterm">pPr</b> element, or in a style. The <b class="bterm">rFonts</b> element takes the same attributes as the <b class="bterm">defaultFonts</b> element. For example, the following element sets the font for a run to Tahoma:</p><pre>
<code><w:r>
<w:rPr>
<w:rFonts w:ascii="Tahoma" w:h-ansi="Tahoma" w:cs="Tahoma"/>
</w:rPr>
<w:t>Hello, World</w:t>
</w:r>
</code>
</pre><p>The font that you use to display your text doesn't have to be listed in the <b class="bterm">fonts</b> element at the start of the document. However, without the information in the <b class="bterm">fonts</b> element, if the font that you specify in the <b class="bterm">rFonts</b> element isn't available on the computer where Word is displaying the document, Word may not make the best choice in selecting a substitute font.</p><h3>Formatting a Section</h3><p>At the section level, formatting information is held with the <b class="bterm">sectPr</b> element at the end of the section. Within the <b class="bterm">sectPr</b> element, child elements allow you to control the page's size and margins and to define columns for the page.</p><h4>Setting a Page's Size and Margins</h4><p>In the <b class="bterm">sectPr</b> elements, there are two elements that control your page's layout:</p><ul>
<li><b class="bterm">pgSz</b>: The page size element. The attributes of this element let you set the height and width of your page.</li>
<li><b class="bterm">pgMar</b>: The page margin element. The attributes of this element let you set the width of the left, right, top, and bottom margins.</li>
</ul><p>The following <b class="bterm">pgSz</b> element uses the <b class="bterm">w</b> attribute to set a page width of 12,240 twips (8.5 inches) and the <b class="bterm">h</b> attribute to set the height at 15,840 twips (11 inches):</p><pre>
<code><w:sectPr>
<w:pgSz w:w="12240" w:h="15840" w:code="1"/>
</w:sectPr>
</code>
</pre><p>The following <b class="bterm">pgMar</b> element sets the top and bottom margins at 1,440 twips (1 inch) and the left and right margins at 1,800 twips (1.25 inches). In addition, the header and footer are 720 twips (0.5 inches) each.</p><pre>
<code><w:sectPr>
<w:pgMar w:top="1440" w:right="1800" w:bottom="1440" w:left="1800"
w:header="720" w:footer="720" />
</w:sectPr>
</code>
</pre><p>The <b class="bterm">pgMar</b> element also lets you specify how much space is to be set aside for the gutter, which is the part of the page that is lost to the binding process when pages are bound together. In the previous example, no space has been left for the gutter. This next example sets aside 360 twips (0.25 inches) for the gutter:</p><pre>
<code><w:sectPr>
<w:pgMar w:top="1440" w:right="1800" w:bottom="1440" w:left="1800"
w:header="720" w:footer="720" w:gutter="360"/>
</w:sectPr>
</code>
</pre><p>Typically, documents are bound down their inside edges. If your documents are bound along the top, you'll need to specify that in the <b class="bterm">docPr</b> element:</p><pre>
<code><w:docPr>
<w:gutterAtTop w:val="on"/>
</w:docPr>
</code>
</pre><p>To force the gutter to the right side of the page, set the <b class="bterm">rtlGutter</b> element to "on" in the <b class="bterm">sectPr</b> element:</p><pre>
<code><w:sectPr>
<w:rtlGutter w:val="on"/>
</w:sectPr>
</code>
</pre><h4>Columns</h4><p>You can define columns in the <b class="bterm">sectPr</b> element by using the <b class="bterm">cols</b> element. If your columns are all the same width, you need only to specify the number of columns (in the <b class="bterm">num</b> attribute) and the space between columns (in the <b class="bterm">space</b> attribute):</p><pre>
<code><w:sectPr>
<w:cols w:num="4" w:space="720"/>
</w:sectPr>
</code>
</pre><p>If the columns have different widths, you must insert <b class="bterm">col</b> elements inside the <b class="bterm">cols</b> element. However, you must still specify the number of columns on the <b class="bterm">cols</b> element. You must also turn off the <b class="bterm">equalWidth</b> attribute.</p><pre>
<code><w:sectPr>
<w:cols w:num="4" w:sep="on" w:space="1440" w:equalWidth="off">
<w:sectPr>
</code>
</pre><p>For each <b class="bterm">col</b> element except the last one, you specify the width of the column and the space following it.</p><pre>
<code><w:cols w:num="4" w:sep="on" w:space="1440" w:equalWidth="off">
<w:col w:w="1440" w:space="500"/>
<w:col w:w="2880" w:space="500"/>
<w:col w:w="1080" w:space="750"/>
<w:col w:w="1080"/>
</w:cols>
</code>
</pre><p>You do not have to do anything further. Word will make the content of the <b class="bterm">t</b> elements in the document's body flow, or "snake," through the columns.</p><h2>Section 4: Document Components</h2><p>This section shows how to add lists, tables, headers, footers, and title page elements to a WordprocessingML document. You'll also see how to add both document properties and document information to your document.</p><h3>Lists</h3><p>In WordprocessingML, lists are a series of paragraphs that have a list style applied to them, with each item in the list in a separate paragraph. What distinguishes a "list paragraph" from an ordinary paragraph is the presence of a <b class="bterm">listPr</b> element in the <b class="bterm">pPr</b> element in the paragraph. The <b class="bterm">listPr</b> element specifies the list style to be used with the paragraph's content and the level of the list. Here is a sample of a list with two items, which are represented by the two paragraphs with <b class="bterm">listPr</b> elements:</p><pre>
<code><w:p>
<w:pPr>
<b class="bterm"> <w:listPr></b>
<b class="bterm"> <w:ilvl w:val="0" /></b>
<b class="bterm"> <w:ilfo w:val="1" /></b>
<b class="bterm"> </w:listPr></b>
</w:pPr>
<w:r>
<w:t>Item 1</w:t>
</w:r>
</w:p>
<w:p>
<w:pPr>
<b class="bterm"> <w:listPr></b>
<b class="bterm"> <w:ilvl w:val="0" /></b>
<b class="bterm"> <w:ilfo w:val="1" /></b>
<b class="bterm"> </w:listPr></b>
</w:pPr>
<w:r>
<w:t>Item 2</w:t>
</w:r>
</w:p>
</code>
</pre><p>Only two elements can appear inside the <b class="bterm">listPr</b> element:</p><ul>
<li><b class="bterm">ilvl</b>: The list's level number. This number is incremented as lists are nested within lists.</li>
<li><b class="bterm">ilfo</b>: The list style to use. This number must refer to a list style defined in the <b class="bterm">lists</b> element.</li>
</ul><p>As an example of the <b class="bterm">ilvl</b> element in action, consider the list shown in Figure 8:</p><img border="0" src="../img/WordPro008_ZA01152114.gif" alt=""><p><b class="bterm">Figure 8. Example of the ilvl element in use</b></p><p>There are actually three lists in the example. First, there is an outer list with two items ("Types of Web sites" and "WayFinding", numbered 1 and 2). Within those items are two nested lists. The first is the list consisting of "Applications", "Content", and "Hybrid"; the second list consists of "Planning strategies" and "Executing plans with feedback". In WordprocessingML, this example consists of seven paragraphs, one for each list item. The paragraphs in different lists are at different paragraph levels and have different list styles assigned to them.</p><p>For the first three paragraphs, the WordprocessingML would look like this:</p><pre>
<code><w:p>
<w:pPr>
<w:listPr>
<w:ilvl w:val="0" />
<w:ilfo w:val="2" />
</w:listPr>
</w:pPr>
<w:r>
<w:t>Types of Web sites</w:t>
</w:r>
</w:p>
<w:p>
<w:pPr>
<w:listPr>
<w:ilvl w:val="1" />
<w:ilfo w:val="2" />
</w:listPr>
</w:pPr>
<w:r>
<w:t>Applications</w:t>
</w:r>
</w:p>
<w:p>
<w:pPr>
<w:listPr>
<w:ilvl w:val="1" />
<w:ilfo w:val="2" />
</w:listPr>
</w:pPr>
<w:r>
<w:t>Content</w:t>
</w:r>
</w:p>
</code>
</pre><p>The entry in the outermost list ("Types of Web sites") has an <b class="bterm">ilvl</b> element with a <b class="bterm">val</b> attribute of "0". The next paragraph, which is the first item of the nested list ("Applications") has an <b class="bterm">ilvl</b> element with a <b class="bterm">val</b> attribute of "1", indicating that the paragraph is nested one level deep. All of the paragraphs use the same list style, specified in the <b class="bterm">ilfo</b> element as "2".</p><p>The value in the <b class="bterm">ilfo</b> element refers to a <b class="bterm">list</b> element that appears inside the <b class="bterm">lists</b> element before the <b class="bterm">body</b> element. The <b class="bterm">list</b> element, in turn, associates the <b class="bterm">ilfo</b> element id with a particular list definition by using the <b class="bterm">ilst</b> element. The following <b class="bterm">list</b> element, for instance, defines list "1" as using list definition "2":</p><pre>
<code><w:lists>
<w:list w:ilfo="1">
<w:ilst w:val="2" />
</w:list>
</w:lists>
</code>
</pre><p>The <b class="bterm">list</b> element can contain one other element, <b class="bterm">lvlOverride</b>. The <b class="bterm">lvlOverride</b> element contains elements that override settings in the list definition. These override settings can include a new starting number for the list and different formatting. By using the <b class="bterm">lvlOverride</b> element, you can specify settings for a particular list (or part of a list) without having to create a whole new list definition.</p><p>The actual list definitions are defined inside the <b class="bterm">listDef</b> element, which also appears inside the <b class="bterm">lists</b> element. Within the <b class="bterm">listDef</b> element, the <b class="bterm">listDefId</b> attribute (which must be numeric) specifies the list name that is used in the <b class="bterm">ilfo</b> element of the <b class="bterm">list</b> element. All of the children of the <b class="bterm">listDef</b> element are given in Table 16.</p><p>Within the <b class="bterm">listDef</b> element, <b class="bterm">lvl</b> elements define how the list items at each level are to be formatted. The format information inside an <b class="bterm">lvl</b> element can include a <b class="bterm">pPr</b> element (containing formatting for <b class="bterm">p</b> elements) and an <b class="bterm">rPr</b> element (containing formatting for <b class="bterm">r</b> elements), among other elements. The <b class="bterm">pPr</b> and <b class="bterm">rPr</b> settings will automatically be applied to the <b class="bterm">p</b> and <b class="bterm">r</b> elements that make up the list item's paragraph.</p><p>Also within the <b class="bterm">lvl</b> element, the <b class="bterm">start</b> element specifies the starting number for the list.</p><p>The following sample <b class="bterm">listDef</b> style definition defines two levels of a list (Word typically generates eight levels of definition for a <b class="bterm">listDef</b> element). The list definition is tied to the actual list in the body of the document through a <b class="bterm">list</b> element. The example demonstrates that linkage. Starting from the <b class="bterm">listDef</b> element:</p><ol>
<li>The <b class="bterm">listDef</b> element has its <b class="bterm">listDefId</b> attribute set to "2", identifying this as list definition 2.</li>
<li>Following the <b class="bterm">listDef</b> element, a <b class="bterm">list</b> element has the <b class="bterm">val</b> attribute of its <b class="bterm">ilst</b> element set to "2". This ties this <b class="bterm">list</b> element to list definition 2.</li>
<li>The <b class="bterm">list</b> element has its <b class="bterm">ilfo</b> attribute is set to "1", which identifies this as list 1.</li>
<li>In the following <b class="bterm">body</b> element, a <b class="bterm">listPr</b> element has an <b class="bterm">ilfo</b> element with its <b class="bterm">val</b> attribute set to "1". This ties the <b class="bterm">listPr</b> element back to list 1 which, in turn, is tied back to list definition 1.</li>
</ol><pre>
<code><w:lists>
<w:listDef w:listDefId="2">
<w:lvl w:ilvl="0">
<w:start w:val="1" />
<w:lvlText w:val="%1." />
<w:lvlJc w:val="left" />
<w:pPr>
<w:tabs>
<w:tab w:val="list" w:pos="1080" />
</w:tabs>
<w:ind w:left="1080" w:hanging="720" />
</w:pPr>
<w:rPr>
<w:rFonts w:hint="default" />
</w:rPr>
</w:lvl>
<w:lvl w:ilvl="1" w:tplc="56325532">
<w:start w:val="1" />
<w:nfc w:val="4" />
<w:lvlText w:val="%2." />
<w:lvlJc w:val="left" />
<w:pPr>
<w:tabs>
<w:tab w:val="list" w:pos="1800" />
</w:tabs>
<w:ind w:left="1800" w:hanging="720" />
</w:pPr>
<w:rPr>
<w:rFonts w:hint="default" />
</w:rPr>
</w:lvl>
</w:listDef>
<w:list w:ilfo="1">
<w:ilst w:val="2" />
</w:list>
</w:lists>
<w:body>
<w:p>
<w:pPr>
<w:listPr>
<w:ilvl w:val="0" />
<w:ilfo w:val="1" />
</w:listPr>
</w:pPr>
<w:r>
<w:t>Types of Web sites</w:t>
</w:r>
</w:p>
</w:body>
</code>
</pre><p>Using the <b class="bterm">list</b> element as an intermediary between the list definition in the <b class="bterm">listDef</b> element and the <b class="bterm">listPr</b> tag in the body makes it easy to change a style for a group of lists. Rather than rewrite the list definition or set all the lists in the document to use a different list definition, all that's necessary is to update the <b class="bterm">val</b> attribute of the <b class="bterm">ilst</b> element in the <b class="bterm">list</b> element so that it points to a different <b class="bterm">listDef</b> element. All the <b class="bterm">listPr</b> tags that use that <b class="bterm">list</b> element will now be displayed according to the new <b class="bterm">listDef</b> element.</p><h3>Headers, Footers, and Title Pages</h3><p>WordprocessingML lets you add headers, footers, and a title page to your document. In WordprocessingML, headers and footers are just another kind of paragraph.</p><p>Headers and footers are defined in the <b class="bterm">sectPr</b> element that marks the end of the section. In the <b class="bterm">sectPr</b> element, the <b class="bterm">hdr</b> elements contain the definitions of the headers for the section, and the <b class="bterm">ftr</b> elements contain the definitions for the footers. Within the <b class="bterm">hdr</b> and <b class="bterm">ftr</b> elements, the content of the element is treated like the content of the <b class="bterm">body</b> element: <b class="bterm">p</b>, <b class="bterm">r</b>, and <b class="bterm">t</b> elements are used to hold the text that makes up the header or footer.</p><p>Here's an example of the definition of a header and a footer:</p><pre>
<code><w:sectPr>
<w:hdr w:type="odd" >
<w:p>
<w:pPr>
<w:pStyle w:val="Header"/>
</w:pPr>
<w:r>
<w:t>My Header</w:t>
</w:r>
</w:p>
</w:hdr>
<w:ftr w:type="odd">
<w:p>
<w:pPr>
<w:pStyle w:val="Footer"/>
</w:pPr>
<w:r>
<w:t>My Footer</w:t>
</w:r>
</w:p>
</w:ftr>
<w:sectPr>
</code>
</pre><p>You can use any style that you want to control the formatting of a header or footer. A typical header style might look like this:</p><pre>
<code><w:style w:type="paragraph" w:styleId="Header" >
<w:name w:val="header"/>
<w:basedOn w:val="Normal"/>
<w:pPr>
<w:pStyle w:val="Header"/>
<w:tabs>
<w:tab w:val="center" w:pos="4320"/>
<w:tab w:val="right" w:pos="8640"/>
</w:tabs>
</w:pPr>
</w:style>
</code>
</pre><p>The <b class="bterm">hdr</b> and <b class="bterm">ftr</b> elements have a <b class="bterm">type</b> attribute that takes one of three values: "even", "odd", and "first". If you're only using one <b class="bterm">hdr</b> or <b class="bterm">ftr</b> element, the <b class="bterm">type</b> attribute must be set to "odd".</p><p>To have a different header (or footer) on even and odd pages, you will need two <b class="bterm">hdr</b> elements, one with its <b class="bterm">type</b> attribute set to "even" and one with its <b class="bterm">type</b> attribute set to "odd". For example:</p><pre>
<code><w:sectPr>
<w:hdr w:type="odd">
<w:p>
<w:pPr>
<w:pStyle w:val="Header"/>
</w:pPr>
<w:r>
<w:t>My Odd Header</w:t>
</w:r>
</w:p>
</w:hdr>
<w:hdr w:type="even">
<w:p>
<w:pPr>
<w:pStyle w:val="Header"/>
</w:pPr>
<w:r>
<w:t>My Even Header</w:t>
</w:r>
</w:p>
</w:hdr>
</w:sectPr>
</code>
</pre><p>You must also add the <b class="bterm">evenAndOddHeaders</b> element to the <b class="bterm">docPr</b> element at the top of the document:</p><pre>
<code><w:docPr>
<w:evenAndOddHeaders/>
</w:docPr>
</code>
</pre><p>If you set the <b class="bterm">type</b> attribute of a <b class="bterm">hdr</b> or <b class="bterm">ftr</b> element to "first", the <b class="bterm">hdr</b> or <b class="bterm">ftr</b> will be used only on the first page (even if it's the only <b class="bterm">hdr</b> or <b class="bterm">ftr</b> element in the document). You don't have to add any elements to the document properties to use this option, but you do need to add the <b class="bterm">titlePg</b> element to the end of the <b class="bterm">sectPr</b> element, following the definition of your headers and footers:</p><pre>
<code><w:sectPr>
<w:hdr w:type="first">
<w:p>
<w:pPr>
<w:pStyle w:val="Header"/>
</w:pPr>
<w:r>
<w:t>My Title Page Header</w:t>
</w:r>
</w:p>
</w:hdr>
<w:titlePg/>
</w:sectPr>
</code>
</pre><p>To ensure that your headers and footers display correctly, you should allocate the space on the page to display them. For this, you'll need to control your page's layout, as described earlier in "Formatting a Section."</p><h3>Tables</h3><p>In WordprocessingML, tables are defined with the <b class="bterm">tbl</b> element (Table 10 lists the high-level table elements). The following elements are used within the <b class="bterm">tbl</b> element:</p><ul>
<li>The <b class="bterm">tblPr</b> element contains property settings for the table (see Table 11). Within the <b class="bterm">tblPr</b> element, the <b class="bterm">tblpPr</b> element holds settings that control the table's position (see Table 12).</li>
<li>The <b class="bterm">tblGrid</b> element contains <b class="bterm">gridCol</b> elements that define the widths of the columns in the table.</li>
<li><b class="bterm">tr</b> elements are used to define the rows for the table. Within the <b class="bterm">tr</b> element, <b class="bterm">trPr</b> elements define properties for the row (see Table 13).</li>
<li>Within the <b class="bterm">tr</b> element, <b class="bterm">tc</b> elements are used to define cells within the row. Within the <b class="bterm">tc</b> elements, <b class="bterm">tcPr</b> elements define properties for the cell (see Table 14). Also within the <b class="bterm">tc</b> elements is the table's content. The content of a <b class="bterm">tc</b> element can be one or more <b class="bterm">p</b> elements or even another table.</li>
</ul><p>The following example shows a table with two columns and a single row. The <b class="bterm">tbl</b> element is followed by a <b class="bterm">tblPr</b> element, which contains a set of table properties. As is typical in WordprocessingML, each property is an empty element with a single <b class="bterm">val</b> attribute that contains the value for the property. In this example:</p><ul>
<li>The <b class="bterm">tblStyle</b> element specifies that the table is to use the "TableGrid" style (which would have to be defined in the <b class="bterm">styles</b> element at the top of the document).</li>
<li>The <b class="bterm">tblW</b> element specifies the total width of the table (in this case, "auto").</li>
<li>The <b class="bterm">tblLook</b> element contains a bitmask that specifies how rows are to be formatted. The hexadecimal value "000001E0" is the result of summing the values for four options: header row formatting, last row formatting, header column formatting, and last column formatting.</li>
</ul><pre>
<code><w:tbl>
<w:tblPr>
<w:tblStyle w:val="TableGrid"/>
<w:tblW w:w="0" w:type="auto"/>
<w:tblLook w:val="000001E0"/>
</w:tblPr>
</code>
</pre><p>The next element inside the <b class="bterm">tbl</b> element is the <b class="bterm">tblGrid</b> element, which contains one <b class="bterm">gridCol</b> element for each column in the table. The <b class="bterm">w</b> attribute of the <b class="bterm">gridCol</b> element gives the width of the column in twips. In this example, there are two columns, one 1770 twips and one 1400 twips wide:</p><pre>
<code><w:tblGrid>
<w:gridCol w:w="1770"/>
<w:gridCol w:w="1400"/>
</w:tblGrid>
</code>
</pre><p>With the table now defined, <b class="bterm">tr</b> elements are added to contain the cells with the table's content. The <b class="bterm">tr</b> element can contain a <b class="bterm">trPr</b> element, which holds the properties for the row (for example, the row's height and whether it can be split across a page). The following example omits the <b class="bterm">trPr</b> element.</p><p>Within the <b class="bterm">tr</b> element, the row's cells, which are defined by <b class="bterm">tc</b> elements, contain the table's content. Within a <b class="bterm">tc</b> element, the <b class="bterm">tcPr</b> element contains the properties for the cell. In the following example:</p><ul>
<li>The <b class="bterm">tcW</b> element's <b class="bterm">w</b> attribute specifies that the cell is 1770 units wide.</li>
<li>The <b class="bterm">type</b> attribute specifies that the unit is twips ("dxa").</li>
</ul><p>Also within the <b class="bterm">tc</b> element is the cell's content. In this example, the content is a <b class="bterm">p</b> element with a single run with a single piece of text:</p><pre>
<code><w:tbl>
<w:tr>
<w:tc>
<w:tcPr>
<w:tcW w:w="1770" w:type="dxa"/>
</w:tcPr>
<w:p>
<w:r>
<w:t>Hello, World</w:t>
</w:r>
</w:p>
</w:tc>
</w:tr>
</w:tbl>
</code>
</pre><p>You can merge cells by using the <b class="bterm">vmerge</b> (merge cells vertically) and <b class="bterm">hmerge</b> (merge cells horizontally) elements in the <b class="bterm">tcPr</b> element. An empty <b class="bterm">vmerge</b> or <b class="bterm">hmerge</b> element with its <b class="bterm">val</b> attribute set to "restart" marks the start of a merged range. A <b class="bterm">Vmerge</b> or <b class="bterm">hmerge</b> element with no attributes (or with the <b class="bterm">val</b> attribute set to "continue") marks a cell that is part of the merged region. In this example, the last cell in the first row starts a merge that is completed in the cell below it:</p><pre>
<code><w:tr>
<w:tc>
<w:p>
<w:r>
<w:t>First cell, first row</w:t>
</w:r>
</w:p>
</w:tc>
<w:tc>
<w:tcPr>
<w:vmerge w:val="restart"/>
</w:tcPr>
<w:p>
<w:r>
<w:t>Last cell, first row </w:t>
</w:r>
</w:p>
</w:tc>
</w:tr>
<w:tr>
<w:tc>
<w:p>
<w:r>
<w:t>First cell, second row</w:t>
</w:r>
</w:p>
</w:tc>
<w:tc>
<w:tcPr>
<w:vmerge />
</w:tcPr>
<w:p>
<w:r>
<w:t>Last cell, second row </w:t>
</w:r>
</w:p>
</w:tc>
</w:tr>
</code>
</pre><p>Figure 9 shows the results of merging the two cells. The space that the second cell of the last row would occupy is now just a continuation of the cell above it and can have no separate content. The content specified in the WordprocessingML file for the second cell of the last row disappears when the WordprocessingML is displayed in Word. The content is still present, though, and can be retrieved through Word's object model.</p><img border="0" src="../img/WordPro009_ZA01152115.gif" alt=""><p><b class="bterm">Figure 9. The results of merging two cells</b></p><p>For more information, Table 11 lists the table property elements, Table 12 lists the table positioning elements, Table 13 lists the child elements for table row properties, and Table 14 lists the child elements for table cell properties.</p><h3>Document Properties</h3><p>The document has a set of properties, held in the <b class="bterm">docPr</b> element. Table 9 lists the properties that can be set at the document level. Some useful settings for developers who are creating documents include:</p><ul>
<li><b class="bterm">view</b>: Controls the view mode in Word. The <b class="bterm">val</b> attribute of this element can be set to "print", "outline", "master-pages", "normal", and "web".</li>
<li><b class="bterm">zoom</b>: Controls how large or small the document appears on the screen in Word. The <b class="bterm">val</b> attribute of this element can be set to "none", "full-page", "best-fit", "text-fit". The <b class="bterm">percent</b> attribute can be used to set the percentage of the zoom.</li>
<li><b class="bterm">documentProtection</b>: Controls whether readers can make unintentional changes to all or part of an online form or document.</li>
<li><b class="bterm">footnotePr</b>: This container element holds the default property settings and footnote separators for all footnotes in the document.</li>
<li><b class="bterm">endnotePr</b>: This container element holds the default property settings and endnote separators for all endnotes in the document.</li>
</ul><p>The following example shows a set of document properties that set the user's view to normal, zoom the view to full page, and prevent the user from changing the formatting in the document:</p><pre>
<code><w:docPr>
<w:view w:val="normal"/>
<w:zoom w:val="full-page" w:percent="100"/>
<w:documentProtection w:formatting="on" w:enforcement="on"/>
</w:docPr>
</code>
</pre><h3>Document Information</h3><p>The <b class="bterm">DocumentProperties</b> element performs a different function from the <b class="bterm">docPr</b> element. Like <b class="bterm">docPr</b>, <b class="bterm">DocumentProperties</b> is a container for other elements. The <b class="bterm">DocumentProperties</b> element, however, is not part of the WordprocessingML namespace but is part of the Microsoft Office Common Properties namespace ("urn:schemas-microsoft-com:office:office"), a set of elements common to all Office applications.</p><p>The <b class="bterm">DocumentProperties</b> element contains meta-information about the document, including the document's title, version, and author. Some statistics about the document are also kept in the <b class="bterm">DocumentProperties</b> element, including the number of characters, pages, lines, and paragraphs. Here's a sample <b class="bterm">DocumentProperties</b> element:</p><pre>
<code><o:DocumentProperties>
<o:Title>Sample Document</o:Title>
<o:Author>Jane Doe</o:Author>
<o:Pages>1</o:Pages>
<o:Words>2</o:Words>
<o:Characters>15</o:Characters>
<o:Lines>1</o:Lines>
<o:Paragraphs>1</o:Paragraphs>
<o:Version>11.5606</o:Version>
</o:DocumentProperties>
</code>
</pre><h2>Section 5: Other Topics</h2><h3>Graphics</h3><p>WordprocessingML stores graphics as a combination of Vector Markup Language (VML) and a binary representation of the image. A discussion of VML is outside the scope of this document, but this section shows how picture data fits into the structure of a WordprocessingML document.</p><p>Some shapes are very easy to add. For instance, to add a rectangle to your document, you only need the VML <b class="bterm">rect</b> (rectangle) element. The element's <b class="bterm">style</b> attribute holds the information to draw a rectangle in the right place at the right size:</p><pre>
<code><v:rect id="_x0000_s1032" style="position:absolute;margin-
left:63pt;margin-top:4.2pt;width:54pt;height:45pt;z-index:1" />
</code>
</pre><p>To use the VML <b class="bterm">rect</b> element, you must add the Vector Markup Language (VML) namespace ("urn:schemas-microsoft-com:vml") to the namespaces declared in your document. The Common Properties namespace ("urn:microsoft-schemas:office:office") may also be required if you intend to include anything more than the simplest AutoShapes. Typically, you'll establish these namespaces in the document's root element:</p><pre>
<code><w:wordDocument
xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml"
xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xml:space="preserve">
</code>
</pre><p>Your graphic must appear inside a <b class="bterm">pict</b> element inside an <b class="bterm">r</b> element inside a <b class="bterm">p</b> element. This example uses the VML rect element to add a simple rectangle to the document:</p><pre>
<code><w:p>
<w:r>
<w:pict>
<v:rect id="_x0000_s1032"
style="position:absolute;margin-left:63pt;margin-
top:4.2pt;width:54pt;height:45pt;z-index:1" />
</w:pict>
</w:r>
</w:p>
</code>
</pre><p>If a graphic consists of more than just a simple shape, you will also need to include a base64-encoded version of the graphic:</p><pre>
<code><w:p>
<w:r>
<w:pict>
<v:shapetype id="_x0000_t75" coordsize="21600,21600"
o:spt="75" o:preferrelative="t">
<w:binData w:name="http://01000001.gif">R0lGODlhQQAzAKI
...more base64-encoded data...
q18Ldi1baGzZt1/nZr07dW/Tv0cHDz3cc3HOxzMnt7x8
</w:binData>
<v:shape id="_x0000_i1025" type="_x0000_t75"
style="width:48.75pt;height:38.25pt">
<v:imagedata src="http://01000001.gif"
o:title="FolderN" />
</v:shape>
</w:pict>
</w:r>
</w:p>
</code>
</pre><h3>Bookmarks</h3><p>Bookmarks are not part of the WordprocessingML namespace but are part of the Annotation Markup Language namespace ("http://schemas.microsoft.com/aml/2001/core"), which is conventionally prefixed with "aml". In a WordprocessingML document, <b class="bterm">annotation</b> elements, which are empty elements, bracket the area that is bookmarked. An <b class="bterm">annotation</b> element with its <b class="bterm">type</b> attribute set to "Word.Bookmark.Start" marks the start of a bookmark area; an <b class="bterm">annotation</b> element with its <b class="bterm">type</b> attribute set to "Word.Bookmark.End" marks the end of the bookmark.</p><p>In this example, a complete paragraph (containing the text "Inside bookmark") has been bookmarked with a bookmark called "MyBookmark":</p><pre>
<code><w:p>
<w:r>
<w:t>Before bookmark</w:t>
</w:r>
</w:p>
<b class="bterm"> <aml:annotation aml:id="0" w:type="Word.Bookmark.Start"</b>
<b class="bterm"> w:name="MyBookmark" /></b>
<w:p>
<w:r>
<w:t>Inside bookmark</w:t>
</w:r>
</w:p>
<b class="bterm"> <aml:annotation aml:id="0" w:type="Word.Bookmark.End" /></b>
<w:p>
<w:r>
<w:t>After bookmark</w:t>
</w:r>
</w:p>
</code>
</pre><p>If a bookmark is inserted without enclosing any text, the "Word.Bookmark.Start" <b class="bterm">annotation</b> element will be immediately followed by the corresponding "Word.Bookmark.End" <b class="bterm">annotation</b> element:</p><pre>
<code><w:p>
<w:r>
<w:t>text sur</w:t>
</w:r>
<b class="bterm"> <aml:annotation aml:id="1" w:type="Word.Bookmark.Start"</b>
<b class="bterm"> w:name="MyOtherBookmark" /></b>
<b class="bterm"> <aml:annotation aml:id="1" w:type="Word.Bookmark.End" /></b>
<w:r>
<w:t>rounding bookmark</w:t>
</w:r>
</w:p>
</code>
</pre><p>In addition to the <b class="bterm">type</b> attribute, which identifies an <b class="bterm">annotation</b> element as being used as a bookmark, two attributes of the <b class="bterm">annotation</b> element are used with bookmarks:</p><ul>
<li>The <b class="bterm">name</b> attribute holds the name of the bookmark and allows you to identify the bookmark.</li>
<li>The <b class="bterm">id</b> attribute's value is what links the ending <b class="bterm">annotation</b> element for a bookmark to its starting element. In the previous examples, for instance, the <b class="bterm">id</b> attribute has identical values for the "Word.Bookmark.End" element and the "Word.Bookmark.Start" elements.</li>
</ul><h3>Fields</h3><p>A field is, effectively, a kind of declarative programming. A field is a set of instructions on how part of the document is to be processed. Also included in the field definition are any input parameters and the results of the processing.</p><p>A typical Word document with several form fields can be seen in Figure 10.</p><img border="0" src="../img/WordPro010_ZA01152116.gif" alt=""><p><b class="bterm">Figure 10. A Word document with several fields to enter</b></p><p>WordprocessingML supports two kinds of fields:</p><ul>
<li><b class="bterm">Simple fields</b>: Fields whose instructions are a single unformatted text string.</li>
<li><b class="bterm">Complex fields</b>: Fields whose instructions can include more than just a single unformatted text string (for example, references to other fields, or formatted text).</li>
</ul><h4>Simple Fields</h4><p>Simple fields are defined with the <b class="bterm">fldSimple</b> element. The <b class="bterm">fldSimple</b> element has an <b class="bterm">instr</b> (instruction) attribute whose contents define the field's behavior. Within the <b class="bterm">fldSimple</b> element, an <b class="bterm">r</b> element holds the results of processing the instructions. For instance, this example creates a simple field that will insert the name of the author from the document properties into the text:</p><pre>
<code><w:p>
<w:fldSimple w:instr="AUTHOR \* Upper \* MERGEFORMAT">
<w:r>
<w:t>Jane Doe</w:t>
</w:r>
</w:fldSimple>
</w:p>
</code>
</pre><h4>Complex Fields</h4><p>Complex fields appear in WordprocessingML as a series of <b class="bterm">r</b> elements inside a paragraph. Each <b class="bterm">r</b> element contains one part of the field's definition. Three <b class="bterm">r</b> elements contain <b class="bterm">fldChar</b> elements, which mark the three parts of a complex field definition:</p><ul>
<li>The beginning of the field definition</li>
<li>The end of the field instructions</li>
<li>The end of the field definition</li>
</ul><p>The <b class="bterm">fldChar</b> element is used to mark each of these three parts. The <b class="bterm">fldCharType</b> attribute of the <b class="bterm">fldChar</b> element is set to "begin", "separate", or "end" to mark the parts of the field definition. The field instructions are placed in the <b class="bterm">instrText</b> elements. The <b class="bterm">instrText</b> elements appear between the <b class="bterm">r</b> element that marks the beginning of the field definition and the <b class="bterm">r</b> element that marks the end of the instructions. The results of the field's processing are placed between the <b class="bterm">r</b> element that marks the end of the instructions and the <b class="bterm">r</b> element that marks the end of the field definition. A small set of fields require additional information. For example, form fields require that the definition include a <b class="bterm">fldData</b> element, which holds binary data required by the field.</p><p>To make it easier to find the form field when processing the document, you can add a bookmark to identify the field.</p><p>One kind of complex field is a form text field. A set of WordprocessingML elements that creates a single form field inside a <b class="bterm">p</b> element would look like this:</p><p><b>Note</b> To make it easier to find the form field when processing the document, a bookmark has been used to identify the field in this example.</p><pre>
<code><w:p>
<w:r>
<w:fldChar w:fldCharType="begin">
<w:fldData>////</w:fldData></w:fldChar>
</w:fldChar>
</w:r>
<w:r>
<w:instrText>FORMTEXT</w:instrText>
</w:r>
<w:r>
<w:fldChar w:fldCharType="separate" />
</w:r>
<w:r>
<aml:annotation aml:id="0" w:type="Word.Bookmark.Start"
w:name="MyField" />
<w:t> </w:t>
<aml:annotation aml:id="0" w:type="Word.Bookmark.End" />
</w:r>
<w:r>
<w:fldChar w:fldCharType="end" />
</w:r>
</w:p>
</code>
</pre><p>Looking at the previous example in detail:</p><ul>
<li>The first <b class="bterm">r</b> element contains the <b class="bterm">fldChar</b> element, with its <b class="bterm">fldCharType</b> attribute set to "begin" to indicate the start of a field command. For some fields, the fldChar element may be empty. For a form text field, however, the <b class="bterm">fldData</b> element is required.</li>
<li>For a form text field, the <b class="bterm">fldData</b> element just needs to be a placeholder, four characters wide (Word will fill in this data when it reads the document). Other fields that use <b class="bterm">fldData</b> will have different requirements.</li>
<li>The next <b class="bterm">r</b> element contains the <b class="bterm">instrText</b> element, which contains the commands that tell Word how to process this field. To create a form text field, the <b class="bterm">instrText</b> element must contain the text <b class="bterm">FORMTEXT</b>.</li>
<li>The third <b class="bterm">r</b> element holds another empty <b class="bterm">fldChar</b> element with its <b class="bterm">fldCharType</b> set to "separate". This marks the end of the field commands.</li>
<li>The fourth <b class="bterm">r</b> element contains a <b class="bterm">t</b> element that holds the result of the field's processing (or the initial value for the field). In this example, five blank spaces have been used as the initial value for the field.</li>
<li>The final <b class="bterm">r</b> element holds the last <b class="bterm">fldChar</b> element, this time with its <b class="bterm">fldCharType</b> attribute set to "end" to mark the end of the definition.</li>
</ul><p>For Word to process form fields correctly, the document must be protected for form editing only. You can turn on this level of protection by adding a <b class="bterm">documentProtection</b> element to the <b class="bterm">docPr</b> element at the start of the WordprocessingML document. The <b class="bterm">edit</b> attribute of the <b class="bterm">documentProtection</b> element must be set to "forms" and the <b class="bterm">enforcement</b> attribute must be set to "on". Here's an example:</p><pre>
<code><w:docPr>
<w:documentProtection w:edit="forms" w:enforcement="on" />
</w:docPr>
</code>
</pre><p>After the field has been filled in by the user, the <b class="bterm">r</b> element that contained the original value will hold the value entered by the user. The result would look like this if the user entered "My Data Entered" into the form field:</p><pre>
<code><w:p>
<w:r>
<w:fldChar w:fldCharType="begin">
<w:fldData>////</w:fldData></w:fldChar>
</w:fldChar>
</w:r>
<w:r>
<w:instrText>FORMTEXT</w:instrText>
</w:r>
<w:r>
<w:fldChar w:fldCharType="separate" />
</w:r>
<w:r>
<aml:annotation aml:id="0" w:type="Word.Bookmark.Start"
w:name="MyField" />
<w:t>My Data Entered</w:t>
<aml:annotation aml:id="0" w:type="Word.Bookmark.End" />
</w:r>
<w:r>
<w:fldChar w:fldCharType="end" />
</w:r>
</w:p>
</code>
</pre><h3>Hyperlinks</h3><p>A hyperlink has two components: the hyperlink itself (the text the user will click) and the target for the link. Potential targets include external files, e-mail addresses, and bookmarks. If you are creating a hyperlink in Microsoft Office Word, other targets are supported (for example, the top of the document and headings). However, all of those targets are implemented by adding a bookmark at the appropriate location in the document. In this section, you'll see how to create a bookmark for a target within the document.</p><p>For a bookmark to be the target of a hyperlink, it must be a complete bookmark pair and have a name assigned to it. For instance, in Word if the user creates a hyperlink to the top of the document, a bookmark called "_top" is inserted at the top of the document. The resulting WordprocessingML looks like this:</p><pre>
<code><aml:annotation aml:id="0" w:type="Word.Bookmark.Start" w:name="_top" />
<aml:annotation aml:id="0" w:type="Word.Bookmark.End" />
</code>
</pre><p>The hyperlink that points to this bookmark is represented in WordprocessingML by an <b class="bterm">hlink</b> element that has "_top" in its <b class="bterm">bookmark</b> attribute. The text that is displayed by Word as the hyperlink must be inside a <b class="bterm">r</b> element between the <b class="bterm">hlink</b> element's opening and closing element (see Figure 11 for how the link appears in Word):</p><pre>
<code><w:p>
<w:hlink w:bookmark="_top">
<w:r>
<w:rPr>
<w:rStyle w:val="Hyperlink" />
</w:rPr>
<w:t>Go To Top</w:t>
</w:r>
</w:hlink>
</w:p>
</code>
</pre><img border="0" src="../img/WordPro011_ZA01152117.gif" alt=""><p><b class="bterm">Figure 11. A hyperlink in Microsoft Office Word</b></p><p>You can use any style that you want with your hyperlink. However, the "Hyperlink" style that is generated by Microsoft Office Word is what most users will recognize as the visual clue for a hyperlink (underlined blue text). For consistency's sake, you should consider adding this style to your document and using it with your hyperlinks:</p><pre>
<code><w:style w:type="character" w:styleId="Hyperlink">
<w:name w:val="Hyperlink" />
<w:basedOn w:val="DefaultParagraphFont" />
<w:rsid w:val="365462" />
<w:rPr>
<w:color w:val="0000FF" />
<w:u w:val="single" />
</w:rPr>
</w:style>
</code>
</pre><p>Two other attributes of the <b class="bterm">hlink</b> element can be useful in generating a WordprocessingML hyperlink that will be read Word:</p><ul>
<li><b class="bterm">screentip</b>: The text in this attribute is displayed when the user rests the mouse pointer on the hyperlink in Word (see Figure 12):
<pre>
<code><w:hlink w:bookmark="_top" w:screenTip="a ScreenTip">
</code>
</pre>
</li>
<li><b class="bterm">nohistory</b>: This attribute, when set to 'off', prevents the link from being added to the document's history list when the user clicks it.</li>
</ul><img border="0" src="../img/WordPro012_ZA01152118.gif" alt=""><p><b class="bterm">Figure 12. A Word hyperlink with a ScreenTip</b></p><h3>Macros and Components</h3><p>A document can also contain Visual Basic for Applications (VBA) code, toolbar modifications, OLE custom controls (OCX) and other "active" components. All of these items can be represented in WordprocessingML. In this section, you'll be introduced to how WordprocessingML stores VBA code and OCX controls. You'll also see how Word ensures that software can detect whether these components are present in the document so that the component can, for instance, be scanned for viruses. Word also ensures that if components are not made visible in WordprocessingML, they will not be executed.</p><p>For VBA code, a base64-encoded version of the binary file generated by the VBA editor is held in the <b class="bterm">binData</b> element inside the <b class="bterm">docSuppData</b> element. The <b class="bterm">binData</b> element has a <b class="bterm">name</b> attribute whose value must be set to "editdata.mso". The <b class="bterm">docSuppData</b> element is a top-level element under the <b class="bterm">wordDocument</b> root element, and follows the <b class="bterm">styles</b> element in a document created by Word.</p><p>A typical VBA module in a WordprocessingML document looks like this:</p><pre>
<code><w:docSuppData>
<w:binData w:name="editdata.mso">
QWN0aXZlTWltZQAAAfAEAAAA/////wAAB/AbDwAABA
...more base64-encoded data...
LgBNAFkATQBPAEQAVQBMAEUAAABAAAAL8AQAAAASNFZ4
</w:binData>
</w:docSuppData>
</code>
</pre><p>Representing an OCX control in WordprocessingML is more complicated than storing VBA code because an OCX control also has a graphical representation in the document. For OCX controls, a <b class="bterm">binData</b> element within a <b class="bterm">docOleData</b> element is used to hold the OLE data. For OCX controls, the <b class="bterm">name</b> attribute of the <b class="bterm">binData</b> element must be set to "oledata.mso".</p><pre>
<code><w:docOleData>
<w:binData w:name="oledata.mso">
0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAPgADAP7/CQAGAAAAAAAAA
...more base64-encoded data...
C4zcL+WTKDhJozVltEGRkTOwQAROjpejLDyT5d+/F5BeLt5n3wv4P/Cl4BK=
</w:binData>
</w:docOleData>
</code>
</pre><p>Later in the document, a set of VML-related elements will handle the display of the component.</p><p>Two attributes of the <b class="bterm">wordDocument</b> element are used to indicate the presence of the VBA code and OCX controls: <b class="bterm">macrosPresent</b> for VBA code and <b class="bterm">embeddedObjectPresent</b> for OCX controls.</p><p>The <b class="bterm">macrosPresent</b> attribute is used to indicate that macros are present in the document. If the attribute is missing or if it's set to "no", Word won't load a document that has a <b class="bterm">docSuppData</b> element. This attribute is strictly enforced. If, for instance, the attribute is present and is set to "yes" (indicating that macros are supposed to be present), and Word doesn't find a <b class="bterm">docSuppData</b> element before it finds the <b class="bterm">body</b> element, Word will not load the document.</p><p><b>Note</b> Once the document is loaded, Word's security settings will control whether the VBA code will be allowed to execute.</p><p>The second attribute is the <b class="bterm">embeddedObjectPresent</b> attribute, which indicates that an OCX control may have been used in the document. If the attribute is missing or if it's set to "no", Word won't load a document that has a <b class="bterm">docOleData</b> element. This attribute is not, however, strictly enforced. If the attribute is present and is set to "yes", but Word doesn't find a <b class="bterm">docOleData</b> element before the <b class="bterm">body</b> element, Word will still load the document.</p><h2>Section 6: Auxiliary Elements</h2><p>When a WordprocessingML document is created in Word, a number of elements are included that provide information to any applications used to read the document. These <b class="bterm">auxHint</b> elements, from the Auxiliary XML Document 2003 namespace ("http://schemas.microsoft.com/office/word/2003/auxHint"), provide information about how Word handled various elements. Setting the <b class="bterm">auxHint</b> attributes and elements has <i>no</i> effect on how Word behaves. These elements are provided for the use of other WordprocessingML processing tools and provide a convenient way to access information that would otherwise be difficult to determine.</p><p>When you are creating a document, there is no problem with using the WordprocessingML <b class="bterm">sectPr</b> elements and omitting the <b class="bterm">auxHint</b> section elements in your document. However, when a WordprocessingML document is read, the <b class="bterm">sect</b> elements provide containers for the sections of your document. These containers can be very useful to the application that is processing the document, especially when XSL transformations (XSLTs) are used, because XSLTs are oriented towards processing child elements inside container elements.</p><h3>Sections and Subsections</h3><p>WordprocessingML does not use a container element for a section but, instead, marks the end of a section with a <b class="bterm">sectPr</b> element. However, Word does generate <b class="bterm">sect</b> elements to enclose the <b class="bterm">p</b> elements that make up a section whenever possible, creating a true XML container for sections. Nonetheless, if the inclusion of a <b class="bterm">sect</b> element would generate invalid XML (for example, if a section break occurs within a list or table), Word does not write out the <b class="bterm">sect</b> element.</p><p>Within a <b class="bterm">sect</b> element, each table of contents heading generates <b class="bterm">sub-section</b> elements that enclose content at a particular heading level or lower.</p><h4>The sect Element</h4><p>A WordprocessingML document may consist of any number of <b class="bterm">sect</b> elements. If the document contains multiple <b class="bterm">sectPr</b> elements, which define multiple sections in the document, the document will consist of a series of <b class="bterm">sect</b> elements. Including the <b class="bterm">sect</b> elements in the definition of a WordprocessingML <b class="bterm">body</b> element, this means that there are three possible structures for the <b class="bterm">body</b> element:</p><ul>
<li>A single <b class="bterm">sect</b> element:
<pre>
<code><w:body>
<wx:sect>
<p>
</p>
...etc. ...
</wx:sect>
<w:body>
</code>
</pre>
</li>
<li>Multiple <b class="bterm">sect</b> elements:
<pre>
<code><w:body>
<wx:sect>
<p>
</p>
...etc. ...
</wx:sect>
<wx:sect>
<p>
</p>
...etc. ...
</wx:sect>
...etc. ...
<w:body>
</code>
</pre>
</li>
<li>No <b class="bterm">sect</b> elements (if the document was generated outside Word):
<pre>
<code><w:body>
<p>
</p>
...etc. ...
<w:body>
</code>
</pre>
</li>
</ul><h4>The sub-section Element</h4><p>A <b class="bterm">sub-section</b> element is generated by Word whenever a paragraph is found that has an <b class="bterm">outlineLvl</b> element assigned in the <b class="bterm">p</b> element's <b class="bterm">pPr</b> element. In this example, for instance, the paragraph is assigned to the third level of the outline (the lowest level is 0):</p><pre>
<code><w:p>
<w:pPr>
<w:outlineLvl w:val="2" />
</w:pPr>
<w:r>
<w:t>x</w:t>
</w:r>
</w:p>
</code>
</pre><p>Outline levels are frequently assigned through styles. In Word, the "Heading 1" style has an outline level of 0 set in its <b class="bterm">rPr</b> element. Any text formatted with the "Heading 1" style picks up that outline level and generates a <b class="bterm">sub-section</b> element.</p><p>Word nests <b class="bterm">sub-section</b> elements within each other, depending on the outline level. When Word finds a paragraph with an <b class="bterm">outlineLvl</b> element assigned to it, Word generates an opening <b class="bterm">sub-section</b> element. If the <b class="bterm">outlineLvl</b> element just found is higher than the previous <b class="bterm">outlineLvl</b> element, the new <b class="bterm">sub-section</b> element will be nested within the <b class="bterm">sub-section</b> created for the earlier <b class="bterm">outlineLvl</b>; if the previous <b class="bterm">outlineLvl</b> was equal to or higher than the <b class="bterm">outlineLvl</b> just found, closing elements for all the higher level <b class="bterm">sub-section</b> elements are generated before the new <b class="bterm">sub-section</b> element is opened.</p><p>In this example, for instance, there are five headings at various heading levels:</p><p><b class="bterm">Heading Level 1</b></p><p> Paragraph1</p><p> Paragraph2</p><p><b class="bterm">Heading Level 2</b></p><p> Paragraph3</p><p> Paragraph4</p><p><b class="bterm">Heading Level 2</b></p><p> Paragraph5</p><p> Paragraph6</p><p><b class="bterm">Heading Level 1</b></p><p> Paragraph7</p><p>Omitting all other WordprocessingML elements, the auxiliary <b class="bterm">sect</b> and <b class="bterm">sub-section</b> elements that Word would generate would look like this:</p><pre>
<code><wx:sect>
<wx:sub-section>
Heading Level 1
Paragraph1
Paragraph2
<wx:sub-section>
Heading Level 2
Paragraph3
Paragraph4
</wx:sub-section>
<wx:sub-section>
Heading Level 2
Paragraph5
Paragraph6
</wx:sub-section>
<wx:sub-section>
Heading Level 1
Paragraph7
</wx:sub-section>
</wx:sub-section>
</wx:sect>
</code>
</pre><h4>Using the sect and sub-section Elements</h4><p>Inserting a section break will create a new <b class="bterm">sect</b> element in the document and close all open <b class="bterm">sub-section</b> elements. In this sample, a section break has been added after paragraph4:</p><p><b class="bterm">Heading Level 1</b></p><p> Paragraph1</p><p> Paragraph2</p><p><b class="bterm">Heading Level 2</b></p><p> Paragraph3</p><p> Paragraph4</p><p>Section Break</p><p><b class="bterm">Heading Level 1</b></p><p> Paragraph5</p><p>The resulting <b class="bterm">sect</b> and <b class="bterm">sub-section</b> elements would look like this:</p><pre>
<code><wx:sect>
<wx:sub-section>
Heading Level 1
Paragraph1
Paragraph2
<wx:sub-section>
Heading Level 2
Paragraph3
Paragraph4
</wx:sub-section>
</wx:sub-section>
</wx:sect>
<wx:sect>
<wx:sub-section>
Heading Level 1
Paragraph5
</wx:sub-section>
</wx:sect>
</code>
</pre><h3>Auxiliary Attributes of the Tab Element</h3><p>The <b class="bterm">tab</b> element takes three attributes from the auxiliary namespace: <b class="bterm">wTab</b>, <b class="bterm">tlc</b>, and <b class="bterm">cTlc</b>. If you're reading a document and need to determine where some text that is positioned on a tab stop will fall horizontally on the page, these properties provide useful information.</p><p>In WordprocessingML, the <b class="bterm">tab</b> element moves the text following it to the next tab stop in the document. The <b class="bterm">wTab</b> attribute that Word adds to the <b class="bterm">tab</b> element provides the distance (in twips) between the previous character in the document and the first character of the text at the tab stop. In this example, the word "Hello" is 2,880 twips from the end of the previous text:</p><pre>
<code><w:tab wx:wTab="2880" wx:tlc="none" wx:cTlc="14"/><w:t>Hello</w:t>
</code>
</pre><p>To get the absolute distance between tab stops, you should reference the settings in the <b class="bterm">tab</b> elements of the <b class="bterm">pPr</b> (paragraph properties) element.</p><p>The <b class="bterm">tlc</b> attribute reports on how the space before the tab is filled. Values for this attribute are:</p><ul>
<li><b class="bterm">none</b>: No leader line</li>
<li><b class="bterm">dot</b>: Dotted leader line</li>
<li><b class="bterm">hyphen</b>: Dashed leader line</li>
<li><b class="bterm">underscore</b>: Solid leader line</li>
<li><b class="bterm">heavy</b>: Heavy solid leader line (appears as <b class="bterm">middle-dot</b> in Word 2000 and later)</li>
<li><b class="bterm">middle-dot</b>: Bullet character leader line</li>
</ul><p>The <b class="bterm">cTlc</b> attribute states how many dots were used in the leader before the tab stop. Going back to the previous example, the word "Hello" would have 14 dots between it and the previous text. However, in the example no leader was shown, as indicated by the <b class="bterm">tlc</b> setting of "none".</p><h3>The Auxiliary font Element</h3><p>The <b class="bterm">font</b> element describes the font used by Word for part of the document. In this example, the run is displayed in the MS Mincho font:</p><pre>
<code> <w:rPr>
<wx:font wx:val="MS Mincho"/>
</w:rPr>
<w:t>Hello, World</w:t>
</code>
</pre><p>You can't use the <b class="bterm">font</b> element to set which font is used<nbsp />— you must use the <b class="bterm">rFont</b> or <b class="bterm">pFont</b> elements. However, the auxiliary <b class="bterm">font</b> element is useful when determining what font was used with the text. Every run has four fonts associated with it (ascii, h-ansi, fareast, cs). Word uses the font that is most appropriate for the run. For example, if the run contains Hiragana characters, Word will use the "fareast" font. Without the auxiliary <b class="bterm">font</b> element, any tool processing a WordprocessingML document would have to classify the type of characters in the run in order to determine which font to use.</p><h3>The Auxiliary estimate Attribute</h3><p>The <b class="bterm">estimate</b> attribute can appear as an attribute on a number of elements that hold numerical information. Where the <b class="bterm">estimate</b> attribute appears, it will be set to either "true" or "false" and indicates whether Word has estimated the value in the element ("true" indicates that the value has been estimated).</p><h2>Reference</h2><p><b>Notes</b></p><ul>
<li>This table does not contain a complete listing of all WordprocessingML elements but covers the elements that are most likely to be useful to developers. For a complete listing, see the WordprocessingML Schema reference in the Microsoft Office 2003 Reference Schemas.</li>
<li>Note that the child elements of the various property elements (for example, <b class="bterm">rPr</b>: run properties, <b class="bterm">pPr</b>: paragraph properties, and so on) appear in separate tables. For auxiliary elements, see Table 8.</li>
</ul><p><b class="bterm">Table 1. WordprocessingML Elements</b></p><table>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
<tr>
<td>Fonts</td>
<td>A container element containing information about the fonts used in the document. Also contains the defaultFont element, which specifies the default fonts for the document.</td>
</tr>
<tr>
<td>Lists</td>
<td>A container element for list definitions and the assignments of a list id to a list definition.</td>
</tr>
<tr>
<td>List</td>
<td>Associates a list id with a particular list definition.</td>
</tr>
<tr>
<td>listDef</td>
<td>A container element for the definition of a list. See Table 15.</td>
</tr>
<tr>
<td>documentProperties</td>
<td>A container element for Office-related elements containing information and statistics about the document.</td>
</tr>
<tr>
<td>docPr</td>
<td>A container element for elements that set properties for the document as a whole. See Table 9.</td>
</tr>
<tr>
<td>Styles</td>
<td>A container element for the styles defined within the document.</td>
</tr>
<tr>
<td>Style</td>
<td>A container element that defines a specific style. Styles are referred to by other elements in the document using the styleId attribute. Table 5 lists the attributes of the style element; Table 6 lists children of the style element.</td>
</tr>
<tr>
<td>Body</td>
<td>Contains the portion of the document that holds the text that will be displayed to the user.</td>
</tr>
<tr>
<td>P</td>
<td>A paragraph containing one or more runs.</td>
</tr>
<tr>
<td>R</td>
<td>A run of one or more t elements to be displayed with a consistent set of properties.</td>
</tr>
<tr>
<td>T</td>
<td>Contains the text to be displayed.</td>
</tr>
<tr>
<td>pPr</td>
<td>Container for paragraph properties. For the child elements, see Table 3.</td>
</tr>
<tr>
<td>Tabs</td>
<td>Container element holding tab elements that define tab stops for a paragraph or style.</td>
</tr>
<tr>
<td>Tab</td>
<td>Defines a single tab stop. Attributes are listed in Table 7.</td>
</tr>
<tr>
<td>br</td>
<td>Inserts a break between t elements inside an r element. The type attribute controls what kind of break is inserted: "page", "column", or "text-wrapping" (the default).</td>
</tr>
<tr>
<td>tbl</td>
<td>A container element for a table.</td>
</tr>
<tr>
<td>tblPr</td>
<td>A container element for properties of a table. See Table 11.</td>
</tr>
<tr>
<td>tblpPr</td>
<td>A container element for the elements that control the position of a floating table. See Table 12.</td>
</tr>
<tr>
<td>tr</td>
<td>A container element for the cells in a table that make up a table row.</td>
</tr>
<tr>
<td>trPr</td>
<td>A container element for the properties of a row in a table. See Table 13.</td>
</tr>
<tr>
<td>tc</td>
<td>Contains the content for one cell in a table.</td>
</tr>
<tr>
<td>tcPr</td>
<td>A container element for the properties for a cell in a table. See Table 14.</td>
</tr>
<tr>
<td>sectPr</td>
<td>A container element for the definition of the section of the document preceding the sectPr element.</td>
</tr>
<tr>
<td>ftr</td>
<td>Container element in a sectPr element for the text to be displayed in the page footer.</td>
</tr>
<tr>
<td>hdr</td>
<td>Container element in a sectPr element for the text to be displayed in the page header.</td>
</tr>
<tr>
<td>titlePg</td>
<td>Used in the sectPr element to indicate that a separate header and footer for the first page of this section is allowed.</td>
</tr>
<tr>
<td>docSuppData</td>
<td>Container for VBA code.</td>
</tr>
<tr>
<td>binData</td>
<td>Child element of the docSuppData element. The binData element holds the binary representation of the VBA project.</td>
</tr>
</table><br><p><b>Note</b> Some, but not all, of these elements are empty elements with only a <b class="bterm">val</b> attribute. Where the list of acceptable values for the <b class="bterm">val</b> attribute is short, those values are given in the Definition column in the following table. However, some elements may take additional attributes besides the <b class="bterm">val</b> attribute, so you should always consult the WordprocessingML Schema for a full understanding of each element. In some cases, additional notes regarding the element, including its type definition, are also listed in the Definition column.</p><p><b class="bterm">Table 2. rPr Child Elements (Run Properties)</b></p><table>
<tr>
<th>Element</th>
<th>Description</th>
<th>Definition</th>
</tr>
<tr>
<td><b class="bterm">rStyle</b></td>
<td>Character style for this run.</td>
<td>String. The character style is set in the <b class="bterm">styles</b> section.</td>
</tr>
<tr>
<td><b class="bterm">rFonts</b></td>
<td>Fonts for this run.</td>
<td>String. A font named in the <b class="bterm">fonts</b> section, or "default", "fareast", or "cs".</td>
</tr>
<tr>
<td><b class="bterm">b</b></td>
<td>Sets Latin and Asian characters to bold.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">b-cs</b></td>
<td>Sets complex scripts characters to bold.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">i</b></td>
<td>Sets Latin and Asian characters to italic.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">i-cs</b></td>
<td>Sets complex scripts characters to italic.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">caps</b></td>
<td>Formats lowercase text as capital letters (does not affect numbers, punctuation, non-alphabetic characters, or uppercase letters).</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">smallcaps</b></td>
<td>Formats lowercase text as capital letters and reduces their size (does not affect numbers, punctuation, non-alphabetic characters, or uppercase letters).</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">strike</b></td>
<td>Draws a line through the text.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">dstrike</b></td>
<td>Draws a double line through the text.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">outline</b></td>
<td>Displays the inner and outer borders of each character.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">shadow</b></td>
<td>Adds a shadow behind the text, beneath and to the right of the text.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">emboss</b></td>
<td>Makes text appear as if it is raised off the page in relief.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">imprint</b></td>
<td>Makes selected text appear to be imprinted or pressed into page (also referred to as "engrave").</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">noproof</b></td>
<td>Formats the text so that spelling and grammar errors are ignored in this run.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">snaptogrid</b></td>
<td>Sets the number of characters per line to match the number of characters specified in the <b class="bterm">docGrid</b> element of the current section's properties.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">vanish</b></td>
<td>Prevents the text in this run from being displayed or printed.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">webHidden</b></td>
<td>Prevents the text in this run from being displayed when this document is saved as a Web page.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">color</b></td>
<td>Specifies either an automatic color or a hexadecimal color code for this run.</td>
<td>3-digit hexBinary
<p>or "auto"</p>
</td>
</tr>
<tr>
<td><b class="bterm">spacing</b></td>
<td>The amount by which the spacing between characters is expanded or condensed.</td>
<td>Integer</td>
</tr>
<tr>
<td><b class="bterm">w</b></td>
<td>Stretches or compresses text horizontally as a percentage of its current size.</td>
<td>Integer</td>
</tr>
<tr>
<td><b class="bterm">kern</b></td>
<td>The smallest font size for which kerning should be automatically adjusted.</td>
<td>unsignedInt</td>
</tr>
<tr>
<td><b class="bterm">position</b></td>
<td>The amount by which text should be raised or lowered in relation to the baseline.</td>
<td>Integer</td>
</tr>
<tr>
<td><b class="bterm">sz</b></td>
<td>Font size for this Asian and Latin fonts in this run.</td>
<td>Integer</td>
</tr>
<tr>
<td><b class="bterm">sz-cs</b></td>
<td>Font size for complex script fonts in this run.</td>
<td>Integer</td>
</tr>
<tr>
<td><b class="bterm">highlight</b></td>
<td>Highlights text so it stands out from the surrounding text.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">u</b></td>
<td>Underline formatting for this run.</td>
<td>underlineValue</td>
</tr>
<tr>
<td><b class="bterm">effect</b></td>
<td>Animated text effect for this run.</td>
<td>textEffectValues</td>
</tr>
<tr>
<td><b class="bterm">bdr</b></td>
<td>Border for characters in this run.</td>
<td>borderValues</td>
</tr>
<tr>
<td><b class="bterm">shd</b></td>
<td>Shading for characters in this run.</td>
<td>shdValues</td>
</tr>
<tr>
<td><b class="bterm">fitText</b></td>
<td>Width of the space that this run fits into.</td>
<td>unsignedInt</td>
</tr>
<tr>
<td><b class="bterm">vertAlign</b></td>
<td>Adjusts the vertical position of the text relative to the baseline and changes the font size if possible (to raise or lower the text without reducing the font size, use the 'Position' element).</td>
<td>"baseline", "superscript", or "subscript"</td>
</tr>
<tr>
<td><b class="bterm">rtl</b></td>
<td>Sets the alignment and reading order for this run to right-to-left.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">cs</b></td>
<td>True if text in this run is complex scripts text.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">em</b></td>
<td>Sets the type of emphasis mark for this run.</td>
<td>"none", "dot", "comma", "circle", or "under-dot"</td>
</tr>
<tr>
<td><b class="bterm">hyphen</b></td>
<td>Hyphenation style for this run.</td>
<td>String</td>
</tr>
<tr>
<td><b class="bterm">lang</b></td>
<td>Languages for this run.</td>
<td>2-digit hexBinary or a string</td>
</tr>
<tr>
<td><b class="bterm">asianLayout</b></td>
<td>Special Asian layout formatting properties.</td>
<td>See the schema.</td>
</tr>
<tr>
<td><b class="bterm">specVanish</b></td>
<td>Property that makes text in this run always hidden.</td>
<td>"on", "off"</td>
</tr>
</table><br><p><b>Note</b> Some, but not all, of these elements are empty elements with only a <b class="bterm">val</b> attribute. Where the list of acceptable values for the <b class="bterm">val</b> attribute is short, those values are given in the Definition column in the following table. However, some elements may take additional attributes besides the <b class="bterm">val</b> attribute, so you should always consult the WordprocessingML Schema for a full understanding of each element. In some cases, additional notes regarding the element, including its type definition, are also listed in the Definition column.</p><p><b class="bterm">Table 3. pPr Child Elements (Paragraph Properties)</b></p><table>
<tr>
<th>Element</th>
<th>Description</th>
<th>Definition</th>
</tr>
<tr>
<td><b class="bterm">pStyle</b></td>
<td>Paragraph style.</td>
<td>String (a style defined in the <b class="bterm">styles</b> element of the document).</td>
</tr>
<tr>
<td><b class="bterm">keepNext</b></td>
<td>Keep with next paragraph: Prevents a page break between this paragraph and the next.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">keepLines</b></td>
<td>Keep lines together: Prevents a page break in this paragraph.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">pageBreakBefore</b></td>
<td>Forces a page break before this paragraph.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">framePr</b></td>
<td>Text frame and drop cap properties.</td>
<td>FramePrProperty</td>
</tr>
<tr>
<td><b class="bterm">widowControl</b></td>
<td>Prevents word from printing the last line of a paragraph by itself at the top of the page (widow) or the first line of a paragraph at the bottom of a page (orphan).</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">listPr</b></td>
<td>List properties.</td>
<td>listPrElt</td>
</tr>
<tr>
<td><b class="bterm">supressLineNumbers</b></td>
<td>Prevents line numbers from appearing next to the paragraph. This setting has no effect in documents or sections with no line numbers.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">pBdr</b></td>
<td>Borders for the paragraph.</td>
<td>pBdrElt</td>
</tr>
<tr>
<td><b class="bterm">shd</b></td>
<td>Paragraph shading.</td>
<td>ShdValues</td>
</tr>
<tr>
<td><b class="bterm">tabs</b></td>
<td>A container holding a list of tab elements.</td>
<td>tabsElt</td>
</tr>
<tr>
<td><b class="bterm">suppressAutoHyphens</b></td>
<td>Prevents automatic hyphenation.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">bidi</b></td>
<td>Sets the alignment and reading order for a paragraph to right-to-left.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">adjustRightInd</b></td>
<td>Automatically adjusts the right indent when you are using the document grid.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">snapToGrid</b></td>
<td>Aligns text to document grid (when defined).</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">spacing</b></td>
<td>Spacing between lines and paragraphs.</td>
<td>Two attributes: <b class="bterm">before</b>, <b class="bterm">after</b>. Each contains spacing distance in twips.</td>
</tr>
<tr>
<td><b class="bterm">ind</b></td>
<td>Paragraph indentation.</td>
<td>Integer (twips)</td>
</tr>
<tr>
<td><b class="bterm">contextualSpacing</b></td>
<td>Don't add space between paragraphs of the same style.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">suppressOverlap</b></td>
<td>Don't allow this frame to overlap.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">jc</b></td>
<td>Paragraph alignment.</td>
<td>"left", "right", "center", "both", "medium-kashida", "distribute", "list-tab", "high-kashida", "low-kashida", "thai-distribute"</td>
</tr>
<tr>
<td><b class="bterm">textDirection</b></td>
<td>Orientation for the paragraph in the current cell, text box, or text frame.</td>
<td>"lr-tb", "tb-rl",<br>"bt-lr", "lr-tb-v",<br>"tb-rl-v"</td>
</tr>
<tr>
<td><b class="bterm">outlineLvl</b></td>
<td>Outline level.</td>
<td>Integer</td>
</tr>
<tr>
<td><b class="bterm">divId</b></td>
<td>ID of HTML DIV element this paragraph is currently in.</td>
<td>Integer</td>
</tr>
<tr>
<td><b class="bterm">rPr</b></td>
<td>Run properties for the paragraph mark.</td>
<td>Properties for all <b class="bterm">r</b> elements within this <b class="bterm">p</b> element</td>
</tr>
<tr>
<td><b class="bterm">sectPr</b></td>
<td>Section properties for the section that terminates at this paragraph mark.</td>
<td>Contains the properties for the section. Appears in the last paragraph in the section.</td>
</tr>
<tr>
<td><b class="bterm">kinsoku</b></td>
<td>Asian typography: Use East Asian typography and line-breaking rules to determine which characters begin and end a line on a page.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">wordWrap</b></td>
<td>Asian typography: Allows a line to break in the middle of a Latin word.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">overflowPunct</b></td>
<td>Asian typography: Allows punctuation to continue one character beyond the alignment of other lines in the paragraph. If you do not use this option, all lines and punctuation must be perfectly aligned.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">topLinePunct</b></td>
<td>Asian typography: Allows punctuation to compress at the start of a line, which lets subsequent characters move in closer.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">autoSpaceDE</b></td>
<td>Asian typography: Automatically adjusts character spacing between East Asian and Latin text.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">autoSpaceDN</b></td>
<td>Asian typography: Automatically adjusts character spacing between East Asian text and numbers.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">textAlignment</b></td>
<td>Asian typography: Determines the vertical alignment of all text in a line.</td>
<td>"top", "center", "baseline", "bottom", "auto"</td>
</tr>
</table><br><p><b>Note</b> Some, but not all, of these elements are empty elements with only a <b class="bterm">val</b> attribute. Where the list of acceptable values for the <b class="bterm">val</b> attribute is short, those values are given in the Definition column in the following table. However, some elements may take additional attributes besides the <b class="bterm">val</b> attribute, so you should always consult the WordprocessingML Schema for a full understanding of each element. In some cases, additional notes regarding the element, including its type definition, are also listed in the Definition column.</p><p><b class="bterm">Table 4. sectPr Child Elements (Section Properties)</b></p><table>
<tr>
<th>Element</th>
<th>Description</th>
<th>Definition</th>
</tr>
<tr>
<td><b class="bterm">hdr</b></td>
<td>Headers that appear at the top page in this section.</td>
<td>hdrElt</td>
</tr>
<tr>
<td><b class="bterm">ftr</b></td>
<td>Footers that appear at the bottom of the page in this section.</td>
<td>ftrElt</td>
</tr>
<tr>
<td><b class="bterm">footnotePr</b></td>
<td>Footnote properties for this section.</td>
<td>ftnEdnPropsElt</td>
</tr>
<tr>
<td><b class="bterm">endnotePr</b></td>
<td>Endnote properties for this section.</td>
<td>ftnEdnPropsElt</td>
</tr>
<tr>
<td><b class="bterm">type</b></td>
<td>Section type.</td>
<td>sectTypeElt</td>
</tr>
<tr>
<td><b class="bterm">pgSz</b></td>
<td>Specifies the size and orientation of this page.</td>
<td>pageSzType</td>
</tr>
<tr>
<td><b class="bterm">pgMar</b></td>
<td>Specifies the page margins.</td>
<td>pageMarType</td>
</tr>
<tr>
<td><b class="bterm">paperSrc</b></td>
<td>Specifies where the paper is located in the printer.</td>
<td>paperSourceType</td>
</tr>
<tr>
<td><b class="bterm">pgBorders</b></td>
<td>Specifies the page borders.</td>
<td>pageBordersType</td>
</tr>
<tr>
<td><b class="bterm">lnNumType</b></td>
<td>Specifies the line numbering.</td>
<td>lineNumberType</td>
</tr>
<tr>
<td><b class="bterm">pgNumType</b></td>
<td>Specifies the page numbering options.</td>
<td>pageNumberType</td>
</tr>
<tr>
<td><b class="bterm">cols</b></td>
<td>Specifies the column properties for this section.</td>
<td>columnsType</td>
</tr>
<tr>
<td><b class="bterm">formProt</b></td>
<td>Turns form protection on for this section alone.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">vAlign</b></td>
<td>Sets alignment for text vertically between the top and bottom margins.</td>
<td>"top", "center", "both", "bottom"</td>
</tr>
<tr>
<td><b class="bterm">noEndnote</b></td>
<td>Suppresses endnotes that would ordinarily appear at the end of this section.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">titlePg</b></td>
<td>Specifies that the first page of this section is different and will have different headers and footers.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">textFlow</b></td>
<td>Specifies text flow.</td>
<td>"lr-tb", "tb-rl",<br>"bt-lr", "lr-tb-v",<br>"tb-rl-v"</td>
</tr>
<tr>
<td><b class="bterm">bidi</b></td>
<td>Specifies that this section contains bidirectional (complex scripts) text.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">rtlGutter</b></td>
<td>Positions the gutter at the right of the document.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">docGrid</b></td>
<td>Specifies the type of document grid.</td>
<td>"default", "lines", "lines-and-chars", "snap-to-chars"</td>
</tr>
</table><br><p><b class="bterm">Table 5. style Element Attributes</b></p><table>
<tr>
<th>Attribute</th>
<th>Description</th>
<th>Values</th>
</tr>
<tr>
<td><b class="bterm">type</b></td>
<td>Type of style.</td>
<td>"paragraph", "character", "table", "list"</td>
</tr>
<tr>
<td><b class="bterm">styleId</b></td>
<td>Name used to refer to this style within XML. Unique within the file.</td>
<td>String</td>
</tr>
<tr>
<td><b class="bterm">default</b></td>
<td>Specifies whether this style is the default for this type of style.</td>
<td>"on", "off"</td>
</tr>
</table><br><p><b>Note</b> Some, but not all, of these elements are empty elements with only a <b class="bterm">val</b> attribute. Where the list of acceptable values for the <b class="bterm">val</b> attribute is short, those values are given in the Definition column in the following table. However, some elements may take additional attributes besides the <b class="bterm">val</b> attribute, so you should always consult the WordprocessingML Schema for a full understanding of each element. In some cases, additional notes regarding the element, including its type definition, are also listed in the Definition column.</p><p><b class="bterm">Table 6. style Child Elements (Style Definitions)</b></p><table>
<tr>
<th>Element</th>
<th>Description</th>
<th>Definition</th>
</tr>
<tr>
<td><b class="bterm">name</b></td>
<td>Primary name of style; built-in style names are converted to a language-independent form.</td>
<td>String</td>
</tr>
<tr>
<td><b class="bterm">aliases</b></td>
<td>Secondary names of style, separated by commas.</td>
<td>String</td>
</tr>
<tr>
<td><b class="bterm">sti</b></td>
<td>Built-in style unique numerical identifier.</td>
<td>DecimalNumberProperty</td>
</tr>
<tr>
<td><b class="bterm">basedOn</b></td>
<td><b class="bterm">styleId</b> (name of style) this style is based on.</td>
<td>String</td>
</tr>
<tr>
<td><b class="bterm">next</b></td>
<td><b class="bterm">styleId</b> of the next-paragraph style; used only for paragraph styles.</td>
<td>String</td>
</tr>
<tr>
<td><b class="bterm">link</b></td>
<td><b class="bterm">styleId</b> of the linked style; used only for linked paragraph and character styles.</td>
<td>StringProperty</td>
</tr>
<tr>
<td><b class="bterm">hidden</b></td>
<td>Don't show this style to the user.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">semiHidden</b></td>
<td>Don't show this style to the user unless they request to see it.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">locked</b></td>
<td>This style is restricted for use by end user.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">rsidHex</b></td>
<td>Revision Save Id for this style: a unique identifier used to track when the style was last changed.</td>
<td>NumberProperty</td>
</tr>
<tr>
<td><b class="bterm">pPrp</b></td>
<td>Paragraph properties for the style, if any.</td>
<td>See Table 3.</td>
</tr>
<tr>
<td><b class="bterm">rPr</b></td>
<td>Character properties for the style, if any.</td>
<td>See Table 2.</td>
</tr>
<tr>
<td><b class="bterm">tblPr</b></td>
<td>Table properties.</td>
<td>See Table 11.</td>
</tr>
<tr>
<td><b class="bterm">trPr</b></td>
<td>Table row properties.</td>
<td>See Table 13.</td>
</tr>
<tr>
<td><b class="bterm">tcPr</b></td>
<td>Table cell properties.</td>
<td>See Table 14.</td>
</tr>
<tr>
<td><b class="bterm">tblStylePr</b></td>
<td>Conditional override properties for table styles.</td>
<td>tblStylePrElt</td>
</tr>
</table><br><p><b class="bterm">Table 7. tab Element Attributes</b></p><table>
<tr>
<th>Attribute</th>
<th>Description</th>
<th>Values</th>
</tr>
<tr>
<td><b class="bterm">Val</b></td>
<td>The type of tab stop.</td>
<td>"clear", "left", "right", "center", "decimal", "bar", "list"</td>
</tr>
<tr>
<td><b class="bterm">Leader</b></td>
<td>How empty space between tab stops is to be filled.</td>
<td>"none", "dot", "hyphen", "underscore", "heavy", "middle-dot"</td>
</tr>
<tr>
<td><b class="bterm">Pos</b></td>
<td>Position of the tab stop from the left edge, in twips.</td>
<td>Integer</td>
</tr>
</table><br><p><b class="bterm">Table 8. WordprocessingML Auxiliary Elements and Attributes</b></p><table>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
<tr>
<td><b class="bterm">Elements</b></td>
<td> </td>
</tr>
<tr>
<td><b class="bterm">Sect</b></td>
<td>An arbitrary section of a WordprocessingML document. The <b class="bterm">sect</b> element encloses all text between inserted section breaks.</td>
</tr>
<tr>
<td><b class="bterm">sub-section</b></td>
<td>A container for all elements at the same heading level. Recursive.</td>
</tr>
<tr>
<td><b class="bterm">font</b></td>
<td>The font being used in the paragraph.</td>
</tr>
<tr>
<td><b class="bterm">allowEmptyCollapse</b></td>
<td>Hint to transforms to allow this paragraph to autocollapse if empty (for use with HTML).</td>
</tr>
<tr>
<td><b class="bterm">font</b> </td>
<td>The font that was actively applied by Word for display<nbsp />— use this font for transforms.</td>
</tr>
<tr>
<td><b class="bterm">sym</b> </td>
<td>Hint to transforms that this run resolves to a single symbol, described herein.</td>
</tr>
<tr>
<td><b class="bterm">bgcolor</b></td>
<td>The background color applied at this point.</td>
</tr>
<tr>
<td><b class="bterm">bdrwidth</b></td>
<td>The HTML equivalent of the border width, in points. This element takes into account different internal border styles and represents the appropriate final presentation width.</td>
</tr>
<tr>
<td><b class="bterm">hintShdProperty</b></td>
<td>The HTML equivalent of the background color. This element takes into account various shading settings and represents the appropriate final presentation color.</td>
</tr>
<tr>
<td><b class="bterm">t</b></td>
<td>The text Word displayed for this object.</td>
</tr>
<tr>
<td><b class="bterm">uiName</b></td>
<td>The style name as shown to the user at save time, only exported if different than the <b class="bterm">name</b> element's value.</td>
</tr>
<tr>
<td><b class="bterm">Attributes</b></td>
<td> </td>
</tr>
<tr>
<td><b class="bterm">wTab</b> </td>
<td>Space between start of text at the tab stop and end of previous text.</td>
</tr>
<tr>
<td><b class="bterm">Tlc</b> </td>
<td>Type of leader to use before text at a tab stop.</td>
</tr>
<tr>
<td><b class="bterm">cTlc</b></td>
<td>Number of dots in the leader used.</td>
</tr>
</table><br><p><b>Note</b> Some, but not all, of these elements are empty elements with only a <b class="bterm">val</b> attribute. Where the list of acceptable values for the <b class="bterm">val</b> attribute is short, those values are given in the Definition column in the following table. However, some elements may take additional attributes besides the <b class="bterm">val</b> attribute, so you should always consult the WordprocessingML Schema for a full understanding of each element. In some cases, additional notes regarding the element, including its type definition, are also listed in the Definition column.</p><p><b class="bterm">Table 9. docPr Child Elements (Document Properties)</b></p><table>
<tr>
<th>Element</th>
<th>Description</th>
<th>Definition</th>
</tr>
<tr>
<td><b class="bterm">validateAgainstSchema</b></td>
<td>Templates and Add-Ins XML Schema option: Validate document against attached schemas.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">saveInvalidXML</b></td>
<td>Templates and Add-Ins XML Schema option: Allow saving as XML even if the XML is not valid.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">ignoreMixedContent</b></td>
<td>Templates and Add-Ins XML Schema option: Save and validate ignores all text not in leaf nodes.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">alwaysShowPlaceholderText</b></td>
<td>Turns on display of placeholder text for all empty leaf elements.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">doNotUnderlineInvalidXML</b></td>
<td>Templates and Add-Ins XML Schema option: Turns off wavy underline of schema violations in document.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">removeWordSchemaOnSave</b></td>
<td>XML Save option: Save data only, removing all elements in the WordprocessingML Schema when saving as XML.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">useXSLTWhenSaving</b></td>
<td>XML Save option: Apply a custom transform when saving the document as XML.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">saveThroughXSLT</b></td>
<td>XML Save option: The custom transform to apply when saving document as XML.</td>
<td>saveThroughXsltElt</td>
</tr>
<tr>
<td><b class="bterm">showXMLElements</b></td>
<td>Turns on display of XML elements in document.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">alwaysMergeEmptyNamespace</b></td>
<td>Controls how empty namespace elements that do not belong to a schema are handled. If set to "on", these elements will not be removed. If set to "off", they will be removed.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">hdrShapeDefaults</b></td>
<td>Wrapper for the shape defaults of the headers and footers.</td>
<td>shapeDefaultsElt</td>
</tr>
<tr>
<td><b class="bterm">footnotePr</b></td>
<td>Document-wide footnote properties, including footnote separators.</td>
<td>ftnDocPropsElt</td>
</tr>
<tr>
<td><b class="bterm">endnotePr</b></td>
<td>Document-wide endnote properties, including endnote separators.</td>
<td>ednDocPropsElt</td>
</tr>
<tr>
<td><b class="bterm">compat</b></td>
<td>Container for compatibility options (that is, the user preferences entered on the <b class="bterm">Compatibility</b> tab of the <b class="bterm">Options</b> dialog in Word).</td>
<td>compatElt</td>
</tr>
<tr>
<td><b class="bterm">docVars</b></td>
<td>Container for document variables from documents created in Word version 6.0/95 or earlier.</td>
<td>docVarsElt</td>
</tr>
<tr>
<td><b class="bterm">drawingGridHorizontalSpacing</b></td>
<td>Drawing Grid option: The amount of horizontal space between vertical gridlines.</td>
<td>twipsMeasureProperty</td>
</tr>
<tr>
<td><b class="bterm">drawingGridVerticalSpacing</b></td>
<td>Drawing Grid option: The amount of vertical space between horizontal gridlines.</td>
<td>twipsMeasureProperty</td>
</tr>
<tr>
<td><b class="bterm">displayHorizontalDrawingGridEvery</b></td>
<td>Drawing Grid option: The amount of space between horizontal gridlines drawn on the screen.</td>
<td>decimalNumberProperty</td>
</tr>
<tr>
<td><b class="bterm">displayVerticalDrawingGridEvery</b></td>
<td>Drawing Grid option: The amount of space between vertical gridlines drawn on the screen.</td>
<td>decimalNumberProperty</td>
</tr>
<tr>
<td><b class="bterm">useMarginsForDrawingGridOrigin</b></td>
<td>Drawing Grid option: If set to "on" overrides the settings for <b class="bterm">drawingGridHorizontalOrigin</b> and <b class="bterm">drawingGridVerticalOrigin</b> and sets the upper-left corner of the document area within the margins as the grid origin.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">drawingGridHorizontalOrigin</b></td>
<td>Drawing Grid option: The point at the left edge of the page where you want the invisible grid to begin. This setting is ignored when <b class="bterm">useMarginsForDrawingGridOrigin</b> is set to "on".</td>
<td>twipsMeasureProperty</td>
</tr>
<tr>
<td><b class="bterm">drawingGridVerticalOrigin</b></td>
<td>Drawing Grid option: The point at the top edge of the page where you want the invisible grid to begin. This setting is ignored when <b class="bterm">useMarginsForDrawingGridOrigin</b> is set to "on".</td>
<td>twipsMeasureProperty</td>
</tr>
<tr>
<td><b class="bterm">doNotShadeFormData</b></td>
<td>Specifies whether to turn off the gray shading on form fields.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">printTwoOnOne</b></td>
<td>Page Setup Margins option: For multiple page documents, prints two pages per sheet.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">punctuationKerning</b></td>
<td>Asian Typography option: When kerning for Latin text is turned on, also kern punctuation text.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">characterSpacingControl</b></td>
<td>Asian Typography option: Sets the blank-space compression option you want for Asian characters. The equivalent in HTML is setting <b class="bterm">text-justify-trim</b> on the BODY element.</td>
<td>characterSpacingProperty</td>
</tr>
<tr>
<td><b class="bterm">strictFirstAndLastChars</b></td>
<td>Asian Typography option: Use standard characters to start and end lines of text.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">noLineBreaksAfter</b></td>
<td>Asian Typography option: Specifies which characters are restricted from ending a line.</td>
<td>kinsokuProperty</td>
</tr>
<tr>
<td><b class="bterm">noLineBreaksBefore</b></td>
<td>Asian Typography option: Specifies which characters are restricted from starting a line.</td>
<td>kinsokuProperty</td>
</tr>
<tr>
<td><b class="bterm">webPageEncoding</b></td>
<td>Web option: The encoding you want to use when you save as a Web page.</td>
<td>stringProperty</td>
</tr>
<tr>
<td><b class="bterm">optimizeForBrowser</b></td>
<td>Web option: Specifies whether to disable features not supported by Web browsers.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">relyOnVML</b></td>
<td>Web option: Rely on Vector Markup Language (VML) for displaying graphics in browsers.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">allowPNG</b></td>
<td>Web option: Allow Portable Network Graphics (PNG) as a graphic format.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">doNotRelyOnCSS</b></td>
<td>Web option: Turns off cascading style sheets (CSS) for font formatting of Web pages.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">doNotSaveWebPagesAsSingleFile</b></td>
<td>Web option: When saving this file as a Web page, does not save as a single-file Web page (MHTML).</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">doNotOrganizeInFolder</b></td>
<td>When saving as a Web page, causes all supporting files such as bullets, background textures, and graphics to be stored in the same folder as the Web page.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">doNotUseLongFileNames</b></td>
<td>Web option: Disables long file names of Web pages, forcing a filename of no more than eight characters.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">pixelsPerInch</b></td>
<td>Web option: The number of pixels per inch that you want for the display of pictures in Web pages. The size that you select affects the size of graphics relative to the size of text on the screen.</td>
<td>decimalNumberProperty</td>
</tr>
<tr>
<td><b class="bterm">targetScreenSz</b></td>
<td>Web option: The monitor resolution (screen size) that you are optimizing your Web pages for. The screen size that you specify can affect the size and layout of images on Web pages.</td>
<td>targetScreenSzElt</td>
</tr>
<tr>
<td><b class="bterm">savePreviewPicture</b></td>
<td>Document Properties Summary option: Saves a picture of the first page of the file for previewing. (This option has no effect the document is saved as XML.)</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">alignBordersAndEdges</b></td>
<td>Page Border option: Aligns paragraph borders and tables with the page border throughout the document. Setting this element to "on" eliminates any gaps between adjoining borders. However, Word aligns, or "snaps," text to the edge of a table only if the text is one character width (10.5 points) or less from the page border.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">bordersDontSurroundHeader</b></td>
<td>Page Border option: Causes the page border to exclude the header.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">bordersDontSurroundFooter</b></td>
<td>Page Border option: Causes the page border to exclude the footer.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">gutterAtTop</b></td>
<td>Page Setup Margins option: Positions the gutter at the top of a document. If you have set up your document with facing pages or two pages per sheet (by selecting the <b class="bterm">Mirror margins</b>, <b class="bterm">Book fold</b>, or <b class="bterm">2 pages per sheet</b> setting for the <b class="bterm">Multiple Pages</b> list in the <b class="bterm">Page Setup</b> dialog box), <b class="bterm">gutterAtTop</b> is ignored.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">hideSpellingErrors</b></td>
<td>Spelling and Grammar option: Hides the wavy red line under possible spelling errors in your document.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">hideGrammaticalErrors</b></td>
<td>Spelling and Grammar option: Hides the wavy green line under possible grammatical errors in your document.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">activeWritingStyle</b></td>
<td>Spelling and Grammar option: The writing style you want Word to use to when checking grammar in this document.</td>
<td>writingStyleProperty</td>
</tr>
<tr>
<td><b class="bterm">proofState</b></td>
<td>The state of the proofing tools in this document: "clean" (no errors found) or "dirty" (errors present in the document).</td>
<td>proofProperty</td>
</tr>
<tr>
<td><b class="bterm">formsDesign</b></td>
<td>Specifies whether the document is in forms design mode. In this mode, you can edit or create a form by using the ActiveX® controls in the <b class="bterm">Control Toolbox</b> toolbar.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">attachedTemplate</b></td>
<td>Templates and Add-Ins option: The template that's attached to this document.</td>
<td>stringProperty</td>
</tr>
<tr>
<td><b class="bterm">linkStyles</b></td>
<td>Templates and Add-Ins option: Updates the styles in this document to match the styles in the attached template each time you open the document. This ensures that your document contains up-to-date style formatting.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">stylePaneFormatFilter</b></td>
<td>Bitmask of controlling the display of styles in the <b class="bterm">Styles and Formatting</b> task pane.</td>
<td>shortHexNumberProperty</td>
</tr>
<tr>
<td><b class="bterm">documentType</b></td>
<td>Document type used by the AutoFormat feature.</td>
<td>docTypeProperty</td>
</tr>
<tr>
<td><b class="bterm">mailMerge</b></td>
<td>Container for elements holding mail merge information for this document.</td>
<td>mailMergeElt</td>
</tr>
<tr>
<td><b class="bterm">revisionView</b></td>
<td>Determines how document revisions are viewed.</td>
<td>trackChangesViewElt</td>
</tr>
<tr>
<td><b class="bterm">trackRevisions</b></td>
<td>Marks changes in the current document and keeps track of each change by reviewer name.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">documentProtection</b></td>
<td>Protect Document option: Helps prevent unintentional changes to all or part of an online form or document, as specified.</td>
<td>docProtectProperty</td>
</tr>
<tr>
<td><b class="bterm">autoFormatOverride</b></td>
<td>Protect Document option: Allows the AutoFormat feature to override formatting restrictions.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">defaultTabStop</b></td>
<td>Format Tabs option: The default spacing between tab stops.</td>
<td>twipsMeasureProperty</td>
</tr>
<tr>
<td><b class="bterm">autoHyphenation</b></td>
<td>Language Hyphenation option: Automatically hyphenates the document as you type.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">consecutiveHyphenLimit</b></td>
<td>Language Hyphenation option: The maximum number of consecutive lines of text that can end with a hyphen.</td>
<td>decimalNumberProperty</td>
</tr>
<tr>
<td><b class="bterm">hyphenationZone</b></td>
<td>Language Hyphenation option: The distance from the right margin within which you want to hyphenate your document. Word hyphenates words that fall into the hyphenation zone. A smaller zone reduces the raggedness of the right margin, but more words may require hyphens. A larger zone increases the raggedness of the right margin, but fewer words may require hyphens.</td>
<td>decimalNumberProperty</td>
</tr>
<tr>
<td><b class="bterm">doNotHyphenateCaps</b></td>
<td>Language Hyphenation option: Causes Word to not hyphenate words written in all capital letters.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">showEnvelope</b></td>
<td>Displays the Microsoft Office Outlook® e-mail header in a document.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">summaryLength</b></td>
<td>AutoSummary option: Size for automatic document summary.</td>
<td>decimalNumberProperty</td>
</tr>
<tr>
<td><b class="bterm">clickAndTypeStyle</b></td>
<td>Edit option: Style to be used when automatically formatting paragraphs as a result of double-clicking any open area in the document.</td>
<td>docPrStyleProperty</td>
</tr>
<tr>
<td><b class="bterm">defaultTableStyle</b></td>
<td>Table AutoFormat option: Default table style for new documents.</td>
<td>docPrStyleProperty</td>
</tr>
<tr>
<td><b class="bterm">evenAndOddHeaders</b></td>
<td>Page Setup Layout option: Creates one header or footer for even-numbered pages and a different header or footer for odd-numbered pages.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">bookFoldRevPrinting</b></td>
<td>Page Setup Margin option: For multiple-page documents, specifies whether to print the document as a reverse book fold.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">bookFoldPrinting</b></td>
<td>Page Setup Margin option: For multiple-page documents, specifies whether to print the document as a book fold.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">bookFoldPrintingSheets</b></td>
<td>Page Setup Margin option: For multiple-page documents with book fold and reverse book fold printing, sets the number of sheets per booklet.</td>
<td>decimalNumberProperty</td>
</tr>
<tr>
<td><b class="bterm">view</b></td>
<td>Controls the view mode in Word.</td>
<td>"none", "print", "outline", "master-pages", "normal", "web"</td>
</tr>
<tr>
<td><b class="bterm">zoom</b></td>
<td>Controls how large or small the document appears on the screen in Word.</td>
<td>"none", "full-page", "best-fit", "text-fit"</td>
</tr>
<tr>
<td><b class="bterm">removePersonalInformation</b></td>
<td>If set to "on", helps avoid unintentionally distributing hidden information, such as the document's author or the names associated with comments or tracked changes.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">dontDisplayPageBoundaries</b></td>
<td>View option: Turns off display of the space between the top of the text and the top edge of the page.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">displayBackgroundShape</b></td>
<td>View option: Controls display of the background shape in print layout view.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">printPostScriptOverText</b></td>
<td>Print option: Allows PostScript code in PRINT fields in a document to print on top of the document text instead of underneath it. This element's setting has no effect if a document does not contain PRINT fields.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">printFractionalCharacterWidth</b></td>
<td>Print option: Word for the Macintosh setting that has no effect in other versions of Word.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">printFormsData</b></td>
<td>Print option: Prints the data entered into an online form without printing the online form.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">embedTrueTypeFonts</b></td>
<td>Save option: Stores the TrueType fonts used to create this document along with the document. Others who open the document will be able to view and print it with the fonts used to create it, even if those fonts aren't installed on their computer. (NOTE: TrueType fonts are not embedded in XML files.)</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">doNotEmbedSystemFonts</b></td>
<td>Save option: For the TrueType fonts in your document, does not embed fonts that are likely to already be installed on a computer. This option takes effect only when the <b class="bterm">Embed TrueType fonts</b> option is on.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">saveSubsetFonts</b></td>
<td>Save option: For the TrueType fonts in your document, embeds only the font styles you actually used in the document, which may decrease the file size of your document. If you used 32 or fewer characters of a font, Word embeds only those characters. This option takes effect only when the <b class="bterm">Embed TrueType fonts</b> option is on.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">saveFormsData</b></td>
<td>Saves the data entered in an online form as a single, tab-delimited record so you can use it in a database. Word saves the file in Text Only file format.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">mirrorMargins</b></td>
<td>Page Setup Margins option: For multiple page documents, swaps left and right margins on facing pages.</td>
<td>"on", "off"</td>
</tr>
</table><br><p><b class="bterm">Table 10. Table-Related Elements</b></p><table>
<tr>
<th>Element</th>
<th>Description</th>
</tr>
<tr>
<td><b class="bterm">tbl</b></td>
<td>Identifies a table.</td>
</tr>
<tr>
<td><b class="bterm">tblPr</b></td>
<td>Container for table properties (see Table 11).</td>
</tr>
<tr>
<td><b class="bterm">tblGrid</b></td>
<td>Container for column definitions (<b class="bterm">gridCol</b> element).</td>
</tr>
<tr>
<td><b class="bterm">gridCol</b></td>
<td>Defines a column's width in twips; the table will have one column for each <b class="bterm">gridCol</b> element.</td>
</tr>
<tr>
<td><b class="bterm">tr</b></td>
<td>A row in the table.</td>
</tr>
<tr>
<td><b class="bterm">trPr</b></td>
<td>Container for properties for a row in the table (see Table 13).</td>
</tr>
<tr>
<td><b class="bterm">tc</b></td>
<td>A cell within a row<nbsp />— can contain a paragraph, a <b class="bterm">tbl</b> element, or a <b class="bterm">cfChunk</b> element.</td>
</tr>
<tr>
<td><b class="bterm">tcPr</b></td>
<td>Container for properties for a cell (see Table 14).</td>
</tr>
</table><br><p><b>Note</b> Some, but not all, of these elements are empty elements with only a <b class="bterm">val</b> attribute. Where the list of acceptable values for the <b class="bterm">val</b> attribute is short, those values are given in the Definition column in the following table. However, some elements may take additional attributes besides the <b class="bterm">val</b> attribute, so you should always consult the WordprocessingML Schema for a full understanding of each element. In some cases, additional notes regarding the element, including its type definition, are also listed in the Definition column.</p><p><b class="bterm">Table 11. tblPr Child Elements (Table Properties)</b></p><table>
<tr>
<th>Element</th>
<th>Description</th>
<th>Definition</th>
</tr>
<tr>
<td><b class="bterm">tblStyle</b></td>
<td>The style applied to this table.</td>
<td>Name of a table style.</td>
</tr>
<tr>
<td><b class="bterm">tblW</b></td>
<td>Preferred width of the table.</td>
<td>Integer</td>
</tr>
<tr>
<td><b class="bterm">jc</b></td>
<td>Table alignment.</td>
<td>"left", "center", "right", "both", "medium-kashida", "distribute", "list-tab", "high-kashida", "low-kashida", "thai-distribute"</td>
</tr>
<tr>
<td><b class="bterm">tblCellSpacing</b></td>
<td>HTML <b class="bterm">cellspacing</b> attribute for the table (the spacing between individual cells).</td>
<td>Integer</td>
</tr>
<tr>
<td><b class="bterm">tblInd</b></td>
<td>Width that the table should be indented by.</td>
<td>Integer</td>
</tr>
<tr>
<td><b class="bterm">tblBorders</b></td>
<td>The border definitions for the table.</td>
<td>tblBordersElt</td>
</tr>
<tr>
<td><b class="bterm">shd</b></td>
<td>Table shading; applies to the "cellspacing" gaps.</td>
<td>shdValues</td>
</tr>
<tr>
<td><b class="bterm">tblLayout</b></td>
<td>Specifies whether the table is of fixed width. If not specified, the contents of the table will be taken in to account during layout.</td>
<td>"Fixed"</td>
</tr>
<tr>
<td><b class="bterm">tblOverlap</b></td>
<td>Should this table avoid overlapping another table during layout? If this element is not specified, floating tables will be allowed to overlap.</td>
<td>"Never"</td>
</tr>
<tr>
<td><b class="bterm">tblLook</b></td>
<td>What aspects of the table styles should be included?</td>
<td>Bitmask. 0x0020 (Apply header row formatting)<br>0x0040 (Apply last row formatting)<br>0x0080 (Apply header column formatting)<br>0x0100 (Apply last column formatting)</td>
</tr>
<tr>
<td><b class="bterm">tblpPr</b></td>
<td>Table-positioning properties (for floating tables).</td>
<td>tblpPrElt (see Table 12)</td>
</tr>
<tr>
<td><b class="bterm">tblCellMar</b></td>
<td>Cell margin defaults for this table's cells.</td>
<td>tblCellMarElt</td>
</tr>
<tr>
<td><b class="bterm">tblRtl</b></td>
<td>Is this a right-to-left table? (Logical right-to-left, not visual right-to-left.) This element is used only to persist settings from Word 9.0/2000 and is not recommended for use. Use <b class="bterm">bidiVisual</b> instead.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">bidiVisual</b></td>
<td>Is this not a logical right-to-left table? (Visual right-to-left, not logical right-to-left.)</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">tblStyleRowBandSize</b></td>
<td>When a style specifies the format for a band (a contiguous set) of rows in a table, this element specifies the number of rows in a band.</td>
<td>Integer</td>
</tr>
<tr>
<td><b class="bterm">tblStyleColBandSize</b></td>
<td>When a style specifies the format for a band (a contiguous set) of columns in a table, this element specifies the number of columns in a band.</td>
<td>Integer</td>
</tr>
</table><br><p><b>Note</b> Some, but not all, of these elements are empty elements with only a <b class="bterm">val</b> attribute. Where the list of acceptable values for the <b class="bterm">val</b> attribute is short, those values are given in the Definition column in the following table. However, some elements may take additional attributes besides the <b class="bterm">val</b> attribute, so you should always consult the WordprocessingML Schema for a full understanding of each element. In some cases, additional notes regarding the element, including its type definition, are also listed in the Definition column.</p><p><b class="bterm">Table 12. tblpPr Child Elements (Table Positioning Properties)</b></p><table>
<tr>
<th>Element</th>
<th>Description</th>
<th>Definition</th>
</tr>
<tr>
<td><b class="bterm">leftFromText</b></td>
<td>Distance between the left table border and the surrounding text (for wrapping tables).</td>
<td>Integer</td>
</tr>
<tr>
<td><b class="bterm">rightFromText</b></td>
<td>Distance between the right table border and the surrounding text (for wrapping tables).</td>
<td>Integer</td>
</tr>
<tr>
<td><b class="bterm">topFromText</b></td>
<td>Distance between the top table border and the surrounding text (for wrapping tables).</td>
<td>Integer</td>
</tr>
<tr>
<td><b class="bterm">bottomFromText</b></td>
<td>Distance between bottom table border and the surrounding text (for wrapping tables).</td>
<td>Integer</td>
</tr>
<tr>
<td><b class="bterm">vertAnchor</b></td>
<td>Defines how this table is vertically anchored.</td>
<td>"text", "margin", "page"</td>
</tr>
<tr>
<td><b class="bterm">horzAnchor</b></td>
<td>Defines how this table is horizontally anchored.</td>
<td>"text", "margin", "page"</td>
</tr>
<tr>
<td><b class="bterm">tblpXSpec</b></td>
<td>Horizontal alignment (for example, center, left, or right); overrides position set by other formatting options (for example, page layout settings).</td>
<td>"left", "center", "right", "inside", "outside"</td>
</tr>
<tr>
<td><b class="bterm">tblpX</b></td>
<td>Horizontal distance from anchor.</td>
<td>Integer</td>
</tr>
<tr>
<td><b class="bterm">tblpYSpec</b></td>
<td>Horizontal alignment (for example, top or bottom); overrides position set by other formatting options (for example, page layout settings).</td>
<td>"inline", "top", "center", "bottom", "inside", "outside"</td>
</tr>
<tr>
<td><b class="bterm">tblpY</b></td>
<td>Vertical distance from anchor.</td>
<td>Integer</td>
</tr>
</table><br><p><b>Note</b> Some, but not all, of these elements are empty elements with only a <b class="bterm">val</b> attribute. Where the list of acceptable values for the <b class="bterm">val</b> attribute is short, those values are given in the Definition column in the following table. However, some elements may take additional attributes besides the <b class="bterm">val</b> attribute, so you should always consult the WordprocessingML Schema for a full understanding of each element. In some cases, additional notes regarding the element, including its type definition, are also listed in the Definition column.</p><p><b class="bterm">Table 13. trPr Child Elements (Table Row Properties)</b></p><table>
<tr>
<th>Element</th>
<th>Description</th>
<th>Definition</th>
</tr>
<tr>
<td><b class="bterm">divId</b></td>
<td>Defines what HTML DIV element this row belongs within.</td>
<td>Integer</td>
</tr>
<tr>
<td><b class="bterm">gridBefore</b></td>
<td>Number of grid units consumed before the first cell; assumed to be zero.</td>
<td>Integer</td>
</tr>
<tr>
<td><b class="bterm">gridAfter</b></td>
<td>Number of grid units consumed after the last cell; assumed to be zero.</td>
<td>Integer</td>
</tr>
<tr>
<td><b class="bterm">wBefore</b></td>
<td>Preferred width before the table row.</td>
<td>Integer</td>
</tr>
<tr>
<td><b class="bterm">wAfter</b></td>
<td>Preferred width after the table row.</td>
<td>Integer</td>
</tr>
<tr>
<td><b class="bterm">cantSplit</b></td>
<td>If specified, a page cannot split this row.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">trHeight</b></td>
<td>The height of this row.</td>
<td><b class="bterm">val</b> attribute: Height it twips<br><b class="bterm">h-rule</b> attribute: "exact", "at-least"</td>
</tr>
<tr>
<td><b class="bterm">tblHeader</b></td>
<td>If specified, this row belongs to the collection of "header" rows (which will repeat at the top of every page and will get any special header row formatting from the table style). If this row is not contiguously connected with the first row of the table (that is, if either it isn't the first row itself, or all of the rows between this row and the first row are marked as header rows), this property will be ignored.</td>
<td>"on", "off"</td>
</tr>
</table><br><p><b>Note</b> Some, but not all, of these elements are empty elements with only a <b class="bterm">val</b> attribute. Where the list of acceptable values for the <b class="bterm">val</b> attribute is short, those values are given in the Definition column in the following table. However, some elements may take additional attributes besides the <b class="bterm">val</b> attribute, so you should always consult the WordprocessingML Schema for a full understanding of each element. In some cases, additional notes regarding the element, including its type definition, are also listed in the Definition column.</p><p><b class="bterm">Table 14. tcPr Child Elements (Table Cell Properties)</b></p><table>
<tr>
<th>Element</th>
<th>Description</th>
<th>Definition</th>
</tr>
<tr>
<td><b class="bterm">tcW</b> </td>
<td>Preferred width for this cell.</td>
<td>Integer</td>
</tr>
<tr>
<td><b class="bterm">gridSpan</b></td>
<td>Number of grid units this cell consumes -- assumed to be one.</td>
<td>Integer</td>
</tr>
<tr>
<td><b class="bterm">Vmerge</b></td>
<td>Is this cell part of (or the beginning of) a vertically merged region?</td>
<td>"continue", "restart"</td>
</tr>
<tr>
<td><b class="bterm">Hmerge</b></td>
<td>Is this cell part of (or the beginning of) a horizontally merged region?</td>
<td>"continue", "restart"</td>
</tr>
<tr>
<td><b class="bterm">tcBorders</b></td>
<td>Defines the borders for this cell. Overrides the definitions given by the table borders.</td>
<td>tcBordersElt</td>
</tr>
<tr>
<td><b class="bterm">shd</b></td>
<td>Underlying shading for this cell.</td>
<td>shdValues</td>
</tr>
<tr>
<td><b class="bterm">noWrap</b></td>
<td>If present, specifies that the contents of this cell should never wrap.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">tcMar</b></td>
<td>Margins for this cell (maps to CSS <b class="bterm">padding</b> property). Overrides any definitions given in table properties.</td>
<td>tcMarElt</td>
</tr>
<tr>
<td><b class="bterm">textFlow</b></td>
<td>Defines the text flow for this cell.</td>
<td>"lr-tb": Left To Right; Top to Bottom;
<p>"tb-rl": Top to Bottom; Right to Left;</p>
<p>"bt-lr": Bottom to Top; Left to Right;</p>
<p>"lr-tb-v": Left to Right, Top to Bottom Rotated;</p>
<p>"tb-rl-v": Top to Bottom; Right to Left Rotated</p>
</td>
</tr>
<tr>
<td><b class="bterm">tcFitText</b></td>
<td>Causes text to be sized to fit in cell.</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">vAlign</b></td>
<td>Vertical alignment.</td>
<td>"top", "center", "both", "bottom"</td>
</tr>
</table><br><p><b>Note</b> Some, but not all, of these elements are empty elements with only a <b class="bterm">val</b> attribute. Where the list of acceptable values for the <b class="bterm">val</b> attribute is short, those values are given in the Definition column in the following table. However, some elements may take additional attributes besides the <b class="bterm">val</b> attribute, so you should always consult the WordprocessingML Schema for a full understanding of each element. In some cases, additional notes regarding the element, including its type definition, are also listed in the Definition column.</p><p><b class="bterm">Table 15. listDef Child Elements (List Definitions)</b></p><table>
<tr>
<th>Element</th>
<th>Description</th>
<th>Definition</th>
</tr>
<tr>
<td><b class="bterm">lsid</b></td>
<td>List id.</td>
<td>hexNumberProperty</td>
</tr>
<tr>
<td><b class="bterm">plt</b></td>
<td>Description of the type of list.</td>
<td>"SingleLevel", "MultiLevel", "HybridMultiLevel"</td>
</tr>
<tr>
<td><b class="bterm">tmpl</b></td>
<td>List template for formatting the list.</td>
<td>hexNumberProperty</td>
</tr>
<tr>
<td><b class="bterm">name</b></td>
<td>Name of the list definition.</td>
<td>String</td>
</tr>
<tr>
<td><b class="bterm">styleLink</b></td>
<td>Name of the list style defined in the <b class="bterm">styles</b> element.</td>
<td>String</td>
</tr>
<tr>
<td><b class="bterm">listStyleLink</b></td>
<td>Name of the list style that the list is referencing.</td>
<td>String</td>
</tr>
<tr>
<td><b class="bterm">lvl</b></td>
<td>Container for level properties. An <b class="bterm">lvl</b> element is required for each level in the list. Includes <b class="bterm">pPr</b>, <b class="bterm">tabs</b>, and <b class="bterm">rPr</b> elements.</td>
<td>See Table 16.</td>
</tr>
</table><br><p><b>Note</b> Some, but not all, of these elements are empty elements with only a <b class="bterm">val</b> attribute. Where the list of acceptable values for the <b class="bterm">val</b> attribute is short, those values are given in the Definition column in the following table. However, some elements may take additional attributes besides the <b class="bterm">val</b> attribute, so you should always consult the WordprocessingML Schema for a full understanding of each element. In some cases, additional notes regarding the element, including its type definition, are also listed in the Definition column.</p><p><b class="bterm">Table 16. lvl Child Elements (List-Level Definitions)</b></p><table>
<tr>
<th>Element</th>
<th>Description</th>
<th>Definition</th>
</tr>
<tr>
<td><b class="bterm">start</b></td>
<td>First number in numbering series for the list.</td>
<td>Integer</td>
</tr>
<tr>
<td><b class="bterm">nfc</b></td>
<td>Specifies the number style used for a list.</td>
<td>Integer (see Table 17)</td>
</tr>
<tr>
<td><b class="bterm">lvlRestart</b></td>
<td>When present causes numbering to be restarted at 1.</td>
<td>Integer</td>
</tr>
<tr>
<td><b class="bterm">pStyle</b></td>
<td>Name of a style as defined in the <b class="bterm">styles</b> element.</td>
<td>String</td>
</tr>
<tr>
<td><b class="bterm">isLgl</b></td>
<td>Is this level following "legal numbering" rules?</td>
<td>"on", "off"</td>
</tr>
<tr>
<td><b class="bterm">lvlText</b> </td>
<td>Text to use as a basis for the number of an item in the list.</td>
<td>String</td>
</tr>
<tr>
<td><b class="bterm">suff</b></td>
<td>Text to follow the number of the item in the list.</td>
<td>"Tab", "Space", "Nothing"</td>
</tr>
<tr>
<td><b class="bterm">lvlPicBulletId</b></td>
<td>The number of the built-in graphic to be used as the bullet for an item in the list.</td>
<td>Integer</td>
</tr>
<tr>
<td><b class="bterm">legacy</b></td>
<td>List level is from Word 6.0/95 or earlier.</td>
<td>lvlLegacyElt</td>
</tr>
<tr>
<td><b class="bterm">lvlJc</b></td>
<td>Justification of the actual number.</td>
<td>"left", "center", "right", "both"</td>
</tr>
<tr>
<td><b class="bterm">pPr</b></td>
<td>The <b class="bterm">p</b> element properties.</td>
<td>pPrElt (see Table 3)</td>
</tr>
<tr>
<td><b class="bterm">rPr</b></td>
<td>The <b class="bterm">r</b> element properties.</td>
<td>rPrElt (see Table 2)</td>
</tr>
</table><br><p><b class="bterm">Table 17. nfc Element Integer Values</b></p><table>
<tr>
<th>Internal name for nfc code</th>
<th>Integer value</th>
<th>Description</th>
</tr>
<tr>
<td><b class="bterm">nfcArabic</b></td>
<td>0</td>
<td>Arabic: 1, 2, 3, 4, ...</td>
</tr>
<tr>
<td><b class="bterm">nfcUCRoman</b></td>
<td>1</td>
<td>Uppercase roman: I, II, III, IV, ...</td>
</tr>
<tr>
<td><b class="bterm">nfcLCRoman</b></td>
<td>2</td>
<td>Lowercase roman: i, ii, iii, iv, ...</td>
</tr>
<tr>
<td><b class="bterm">nfcUCLetter</b></td>
<td>3</td>
<td>Uppercase alpha: A, B, C, D, ...</td>
</tr>
<tr>
<td><b class="bterm">nfcLCLetter</b></td>
<td>4</td>
<td>Lowercase alpha: a, b, c, d, ...</td>
</tr>
<tr>
<td><b class="bterm">nfcOrdinal</b></td>
<td>5,</td>
<td>Ordinal: 1st, 2nd, 3rd</td>
</tr>
<tr>
<td><b class="bterm">nfcCardtext</b></td>
<td>6,</td>
<td>Cardinal: One, Two, Three</td>
</tr>
<tr>
<td><b class="bterm">nfcOrdtext</b></td>
<td>7,</td>
<td>Ordinal Text: First, Second, Third</td>
</tr>
<tr>
<td><b class="bterm">nfcHex</b></td>
<td>8,</td>
<td>Hexadecimal: 8, 9, A, B, C, D, E, F, 10, 11, 12</td>
</tr>
<tr>
<td><b class="bterm">nfcChiManSty</b></td>
<td>9,</td>
<td>Chicago Manual of Style: *, †, †</td>
</tr>
<tr>
<td><b class="bterm">nfcDbNum1</b></td>
<td>10</td>
<td>Ideograph-digital</td>
</tr>
<tr>
<td><b class="bterm">nfcDbNum2</b></td>
<td>11</td>
<td>Japanese counting </td>
</tr>
<tr>
<td><b class="bterm">nfcAiueo</b></td>
<td>12</td>
<td>Aiueo </td>
</tr>
<tr>
<td><b class="bterm">nfcIroha</b></td>
<td>13</td>
<td>Iroha</td>
</tr>
<tr>
<td><b class="bterm">nfcDbChar</b></td>
<td>14,</td>
<td>Full-width Arabic: 1, 2, 3, 4</td>
</tr>
<tr>
<td><b class="bterm">nfcSbChar</b></td>
<td>15,</td>
<td>Half-width Arabic: 1, 2, 3, 4</td>
</tr>
<tr>
<td><b class="bterm">nfcDbNum3</b></td>
<td>16</td>
<td>Japanese legal</td>
</tr>
<tr>
<td><b class="bterm">nfcDbNum4</b></td>
<td>17</td>
<td>Japanese digital ten thousand</td>
</tr>
<tr>
<td><b class="bterm">nfcCirclenum</b></td>
<td>18</td>
<td>Enclosed circles</td>
</tr>
<tr>
<td><b class="bterm">nfcDArabic</b></td>
<td>19</td>
<td>Decimal full width2: 1, 2, 3, 4</td>
</tr>
<tr>
<td><b class="bterm">nfcDAiueo</b></td>
<td>20</td>
<td>Aiueo full width</td>
</tr>
<tr>
<td><b class="bterm">nfcDIroha</b></td>
<td>21</td>
<td>Iroha full width</td>
</tr>
<tr>
<td><b class="bterm">nfcArabicLZ</b></td>
<td>22</td>
<td>Leading zero: 01, 02, ..., 09, 10, 11, ...</td>
</tr>
<tr>
<td><b class="bterm">nfcBullet</b></td>
<td>23</td>
<td>Bullet character</td>
</tr>
<tr>
<td><b class="bterm">nfcGanada</b></td>
<td>24</td>
<td>Korean Ganada</td>
</tr>
<tr>
<td><b class="bterm">nfcChosung</b></td>
<td>25</td>
<td>Korea Chosung</td>
</tr>
<tr>
<td><b class="bterm">nfcGB1</b></td>
<td>26</td>
<td>Enclosed full stop</td>
</tr>
<tr>
<td><b class="bterm">nfcGB2</b></td>
<td>27</td>
<td>Enclosed parenthesis</td>
</tr>
<tr>
<td><b class="bterm">nfcGB3</b></td>
<td>28</td>
<td>Enclosed circle Chinese</td>
</tr>
<tr>
<td><b class="bterm">nfcGB4</b></td>
<td>29</td>
<td>Ideograph enclosed circle</td>
</tr>
<tr>
<td><b class="bterm">nfcZodiac1</b></td>
<td>30</td>
<td>Ideograph traditional</td>
</tr>
<tr>
<td><b class="bterm">nfcZodiac2</b></td>
<td>31</td>
<td>Ideograph Zodiac</td>
</tr>
<tr>
<td><b class="bterm">nfcZodiac3</b></td>
<td>32</td>
<td>Ideograph Zodiac traditional</td>
</tr>
<tr>
<td><b class="bterm">nfcTpeDbNum1</b></td>
<td>33</td>
<td>Taiwanese counting</td>
</tr>
<tr>
<td><b class="bterm">nfcTpeDbNum2</b></td>
<td>34</td>
<td>Ideograph legal traditional</td>
</tr>
<tr>
<td><b class="bterm">nfcTpeDbNum3</b></td>
<td>35</td>
<td>Taiwanese counting thousand</td>
</tr>
<tr>
<td><b class="bterm">nfcTpeDbNum4</b></td>
<td>36</td>
<td>Taiwanese digital</td>
</tr>
<tr>
<td><b class="bterm">nfcChnDbNum1</b></td>
<td>37</td>
<td>Chinese counting</td>
</tr>
<tr>
<td><b class="bterm">nfcChnDbNum2</b></td>
<td>38</td>
<td>Chinese legal simplified</td>
</tr>
<tr>
<td><b class="bterm">nfcChnDbNum3</b></td>
<td>39</td>
<td>Chinese counting thousand</td>
</tr>
<tr>
<td><b class="bterm">nfcChnDbNum4</b></td>
<td>40</td>
<td>Chinese (not implemented)</td>
</tr>
<tr>
<td><b class="bterm">nfcKorDbNum1</b></td>
<td>41</td>
<td>Korean digital</td>
</tr>
<tr>
<td><b class="bterm">nfcKorDbNum2</b></td>
<td>42</td>
<td>Korean counting</td>
</tr>
<tr>
<td><b class="bterm">nfcKorDbNum3</b></td>
<td>43</td>
<td>Korea legal</td>
</tr>
<tr>
<td><b class="bterm">nfcKorDbNum4</b></td>
<td>44</td>
<td>Korea digital2</td>
</tr>
<tr>
<td><b class="bterm">nfcHebrew1</b></td>
<td>45</td>
<td>Hebrew-1</td>
</tr>
<tr>
<td><b class="bterm">nfcArabic1</b></td>
<td>46</td>
<td>Arabic alpha</td>
</tr>
<tr>
<td><b class="bterm">nfcHebrew2</b></td>
<td>47</td>
<td>Hebrew-2</td>
</tr>
<tr>
<td><b class="bterm">nfcArabic2</b></td>
<td>48</td>
<td>Arabic abjad</td>
</tr>
<tr>
<td><b class="bterm">nfcHindi1</b></td>
<td>49</td>
<td>Hindi vowels</td>
</tr>
<tr>
<td><b class="bterm">nfcHindi2</b></td>
<td>50</td>
<td>Hindi consonants</td>
</tr>
<tr>
<td><b class="bterm">nfcHindi3</b></td>
<td>51</td>
<td>Hindi numbers</td>
</tr>
<tr>
<td><b class="bterm">nfcHindi4</b></td>
<td>52</td>
<td>Hindi descriptive (cardinals)</td>
</tr>
<tr>
<td><b class="bterm">nfcThai1</b></td>
<td>53</td>
<td>Thai letters</td>
</tr>
<tr>
<td><b class="bterm">nfcThai2</b></td>
<td>54</td>
<td>Thai numbers</td>
</tr>
<tr>
<td><b class="bterm">nfcThai3</b></td>
<td>55</td>
<td>Thai descriptive (cardinals)</td>
</tr>
<tr>
<td><b class="bterm">nfcViet1</b></td>
<td>56</td>
<td>Vietnamese descriptive (cardinals)</td>
</tr>
<tr>
<td><b class="bterm">nfcNumInDash</b></td>
<td>57</td>
<td>Page number format: - 1 -, - 2 -, - 3 -, - 4 -</td>
</tr>
<tr>
<td><b class="bterm">nfcLCRus</b></td>
<td>58</td>
<td>Lowercase Russian alphabet</td>
</tr>
<tr>
<td><b class="bterm">nfcUCRus</b></td>
<td>59</td>
<td>Uppercase Russian alphabet</td>
</tr>
</table><center><a href="XMLSchemaCopyright_HV01147162.htm">©2003-2004 Microsoft Corporation. All rights reserved.</a>
Permission to copy, display and distribute this document is available at: <a
href="http://r.office.microsoft.com/r/rlidAWSContentRedir?AssetID=XT010988631033&CTT=11&Origin=HV011232471033"
target="_new">http://msdn.microsoft.com/library/en-us/odcXMLRef/html/odcXMLRefLegalNotice.asp</a></center></body></html>
|