Microsoft KB Archive/71351

{| = Using the OrgChart Macro in Word For Windows =
 * width="100%"|

Last reviewed: July 30, 1997

Article ID: Q71351 The information in this article applies to:
 * Microsoft Word for Windows, versions 1.0, 1.1, 1.1a, 2.0, 2.0a, 2.0a-CD, 2.0b, 2.0c

SUMMARY
Microsoft Word for Windows 1.x includes an OrgChart macro that generates an organizational chart using the outline of the current document. The macro uses a Word for Windows table and table borders to create the organizational chart effect. An updated version of this macro is available for Word version 2.x for Windows users on the application note titled &quot;Frequently Requested WordBasic Macros for Word for Windows 2.0.&quot; For more information, query on the following words in the Microsoft Knowledge Base:

WD0523 and Appnote

MORE INFORMATION
The OrgChart macro uses the heading levels defined in the current document to generate a multilevel organizational chart using the table function in Word for Windows. You can install the OrgChart macro by following these steps:


 * 1) Open the file EXAMPLES.DOC in Word for Windows.
 * 2) Press the Install button next to the OrgChart listing.

The install process adds OrgChart as a global macro, copies the necessary glossary entries and adds OrgChart to the Macro menu. Be sure to save global, glossary, and command changes when exiting the program to save the macro for future use. To see how the macro operates, follow these steps:

 Open up a new document in Word for Windows.  Type the following words so that each word is a separate paragraph: President Vice President Secretary Treasurer  Place the insertion point in the word President, press CTRL+S, type &quot;Heading 1&quot; (without the quotation marks), and press ENTER. Place the cursor in the word Vice President, press CTRL+S, type &quot;Heading 2&quot;, and press ENTER. Highlight the words Secretary and Treasurer, press CTRL+S, type &quot;Heading 3&quot;, and press ENTER. From the Macro menu, choose OrgChart to create an organizational chart from this document. The macro now prompts &quot;Save changes to Document?&quot; Choosing Yes or No does not affect the creation of the chart. The prompt is simply a precaution against losing data. A dialog box containing options for the paper size, outline range, and orientation of the chart document appears. For this example, select Letter, All, and Portrait, respectively.</li> The next message reads &quot;About to create chart using levels 1 to 3, using &quot;President&quot; as the prime. Continue?&quot; Choose Yes.</li></ol>

The macro goes through the process of extracting information from the outline for each level and constructing each level of the chart from this information. When the macro has finished running, a new document is created containing the words from the original document in an organizational chart, with each level displayed as a lower branch extending from the prime. Note: For the chart to be created correctly, there can only be one &quot;prime&quot; defined in the original document. If you want the &quot;prime&quot; to be a heading 1 style, make sure there is only one heading 1 style entry in the original document.

Note: If there is a blank line between the Heading 1 and Heading 2 lines, the organization chart does not include any of the lower levels. It stops at Heading 1 and only includes that level in the resulting organization chart.

Reference(s):

Microsoft Word for Windows EXAMPLES.DOC
 * }