Microsoft Office Online
Sign in to My Office Online (What's this?) | Sign in

Warning: You are viewing this page with an unsupported Web browser. This Web site works best with Microsoft Internet Explorer 6.0 or later, Firefox 1.5, or Netscape Navigator 8.0 or later. Learn more about supported browsers.

Email this linkEmail this link Printer-Friendly VersionPrinter-Friendly Version Bookmark and ShareShare
Make Visio 2002 organization charts from personnel files
 
Applies to
Microsoft Visio® 2002

If you have personnel data stored in an electronic data file, or have accurate employee data in your Microsoft Exchange Server Directory, you can automatically generate a chart using the Organization Chart Wizard.

This article describes how to:

And provides:


Formats the Organization Chart Wizard can read

The Organization Chart Wizard can read data in a variety of formats, including:

  • Microsoft Excel (.xls).
  • Microsoft Exchange Server Directory (the data in the Microsoft Exchange e-mail Address Book).
  • Tab- or comma-delimited text (.txt).
  • Org Plus (.txt).
  • The file format for a database created in an open database connectivity (ODBC)–compliant database application, such as Microsoft Access.

You can also produce customized reports from databases created using enterprise resource planning (ERP) software, such as SAP, that the wizard can read to generate an organization chart.

Structure your data files

Required data

To successfully generate an organization chart from your personnel data file, the Organization Chart Wizard must be able to identify:

  • Each employee uniquely.
  • Each employee's name. (The way names appear in your data file is the way they'll appear on the organization chart position shapes.)
  • Which person each employee reports to.

Data organized in columns

The Employee ID field in this data file contains numbers that uniquely identify each employee. If no employees have the same name, Name can serve as the unique identifier. The Reports To field must contain managers' unique identifiers. Leave the Reports To field blank for the person at the top of the chart.

Note   If you choose to create an organization chart from the Microsoft Exchange Server Directory, the Organization Chart Wizard automatically locates and reads the appropriate file. Remember that the organization chart that the wizard generates can only be as accurate as the data in the Directory file.

Optional data

Your data file probably includes a number of fields in addition to Unique Identifier, Name, and Reports To. For example, you might have fields for position title, phone number, department, and more. The Organization Chart Wizard lets you decide what you want to do with this data. You can choose to:

  • Display one additional piece of data, along with employee name, on the position shapes in the organization chart.
  • Store some or all of the data in property fields associated with the shapes so that others have access to the data.
  • Leave the data in the data file but ignore it for purposes of the organization chart.

Run the Organization Chart Wizard

After you have structured your data file so the wizard can use the information it contains, you're ready to generate an organization chart.

  1. On the File menu, point to New, point to Organization Chart, and then click Organization Chart Wizard.
  2. On the first screen, click Information that's already stored in a file or database, and then click Next.
  3. Follow the instructions on the wizard pages. Click the question mark (?) for help on a particular page.

Tips on using the Organization Chart Wizard

Issue Tip
You don't want the wizard to stop because of errors in your data file. Check for these typical data file errors before you run the wizard:
  • Duplicate employee names or ID numbers
  • Invalid Reports To information
  • Failure to leave the Reports To field blank for the person at the top of the chart
You want to display some of the information from your data file on each of the organization chart shapes. The information that you display on each shape can come from any of the fields in your data file. You still have access to the information that isn't displayed. Select a shape, and then, on the View menu, click Custom Properties Window.
Your organization chart is too large for one letter-size printed page. Choose the wizard option that allows you to control how much of your organization to display on each page of a multipage organization chart. You can control the number of pages, which employee is at the top of each page, and more.
After the wizard generates the chart, you want to view the data associated with the chart shapes. On the View menu, click Custom Properties Window. Select any shape.

Customize SAP/R3 data to generate organization charts

To customize personnel data from SAP/R3 files so that the Organization Chart Wizard can use it to create an organization chart, do the following:

  1. Structure your files so that the wizard can read them.
  2. Decide what time period you want the organization chart to reflect: present, past, or future. Be sure to choose settings that will generate a report based on this time period.
  3. In SAP/R3, create a report from the Human Resources Master Data. Choose the following infotypes and fields:
    Infotype Field
    Key field infotype Personnel # field
    Org Assignment infotype Description of Position field

    Position # field

    Personal Data infotype Last Name field

    First Name field

  4. In SAP/R3, create a second report from the organization management data. Choose the following infotypes and fields:
    Infotype Field
    Object Name infotype Object ID field

    Object Name field

    Relationships infotype Relationships Between Objects field (specify the Reports To relationship)

    Relationship Specification field, if you want to specify Active or some other type of relationship

    Type of related object field

    ID of related object field

  5. Generate flat data files from these reports and import the files into Microsoft Excel or another ODBC-compliant database application.
  6. In the first report file, concatenate the Last Name and First Name fields into one Name field if you want both names to appear on organization chart shapes. Delete the Last Name and First Name fields.
  7. Run a query that compares Position # fields in the first and second reports to generate a new field in the first report called Manager Position #.
  8. Run a query that compares the Manager Position # field with the Position # field in the first report to generate a new field called Manager Name.
  9. Check the data in the first report for errors that will cause problems for the Organization Chart Wizard. For example, make sure that the Manager Position # field for the person at the top of the organization chart is empty and that no duplicate Personnel ID numbers or Manager Position numbers exist.
  10. Save the first report so that the Organization Chart Wizard can read the data it contains to generate an organization chart.
  11. When the wizard prompts you to choose fields from your data file that correspond to Name, Reports To, and Unique ID, choose the fields that contain names, manager position number, and Personnel ID numbers, respectively.

Use a macro to generate organization charts from ERP data

If you maintain your organizational data in enterprise resource planning (ERP) software, such as PeopleSoft or SAP/R3, you can develop a solution that:

  • Enables you to quickly generate an organization chart from a data file without having to work your way through the Organization Chart Wizard screens.
  • Makes it possible for users who don't use Visio software to generate organization charts automatically from data.

To develop the solution, create a macro or executable file that runs the Organization Chart Wizard from the command line. The macro or executable file must include the statement:

_Organization Chart Wizard.exe <arguments>

where the arguments specify how to build the organization chart. The following table lists the arguments you can use. If an argument name includes spaces, put the name in quotes.

Organization chart solution arguments

Argument Purpose
/USE-LAST-VALUES Reads values from the registry chosen by the last person who used the Organization Chart Wizard interactively. If this argument is specified, all subsequent arguments are ignored.
/FILENAME=<filename> Required, unless /DATASOURCE or /MICROSOFT-EXCHANGE is specified. Specifies the data file name that you want the wizard to read. If the file name includes spaces, put the name in quotes.
/DATASOURCE=, TABLE=, DBQUALIFIER= Required, unless /FILENAME or /MICROSOFT-EXCHANGE is specified. Specifies the name, table, and qualifier of the ODBC-compliant database that you want the wizard to read.
/MICROSOFT-EXCHANGE Required, unless /FILENAME or /DATASOURCE is specified. Specifies the Microsoft Exchange Server data that you want the wizard to read.
/NAME-FIELD=<fieldname> Optional. Specifies the field in the data file where the wizard can find employee names. If you don't specify this field, the wizard looks for common names, such as Name, Employee, Employee Name, or Employees. If it doesn't find a likely field, the wizard fails.
/MANAGER-FIELD=<fieldname> Optional. Specifies the field in the data file where the wizard can find Reports To information. If you don't specify this field, the wizard looks for common names, such as Manager, Reports To, or Reports-to. If doesn't find a likely field, the wizard fails.
/SHAPE-FIELD=<fieldname> Optional. Specifies the field in the data file where the wizard can find the name of the Visio organization chart master that you want it to use. If you don't specify this field, the wizard looks for common names, such as Master Shape or Master-Shape. If it doesn't find a likely field, the wizard continues building the organization chart using shapes that it chooses. For example, you can type Executive in the Shape field for the person at the top of the organization chart, to indicate that the wizard should use the Executive shape for this position when it builds the organization chart. This field also allows you to tell the wizard to use customized shapes that you have created yourself and added to the Organization Chart Shapes stencil.
/HYPERLINK-FIELD=<fieldname> Optional. Specifies the field in the data file where the wizard can find the text used for a shape's hyperlink. The wizard stores the text in the shapes as hyperlink addresses. To access the hyperlink destination, right-click a shape, and then click a hyperlink. The wizard will search the data file for a column name Hyperlink or URL. If it doesn't find a likely field, the wizard will continue building the organization chart.
/FIRSTNAME-FIELD=<fieldname> Optional. Specifies the field in the data file where the wizard can find employees' first names. If you don't specify this field, the wizard looks for common names, such as First Name or First-Name. If it doesn't find a likely field, the wizard continues building the organization chart.
/UNIQUEID-FIELD Optional. Specifies the field containing the unique identifier. If this argument is not specified, the wizard will look for a field containing the same data values that are in the MANAGER-FIELD. If it doesn't find a likely field, the wizard will fail.
/PAGES=<top employee> <num levels> PAGENAME=<pagename>, <top employee> <num levels> PAGENAME=<pagename>, Optional. Specifies how you want the wizard to break the organization chart into pages by identifying the top employee on each page and the number of reporting levels to include on a page. If you specify this argument, you must identify the top employee on each page. Optionally, you can identify the number of reporting levels to include on a page and the page name. If you don't specify the number of levels, the wizard includes all levels on a page. Names with spaces must be in quotes. Always include a space between <top employee> and <num levels> and PAGENAME=<pagename>.
/DISPLAY-FIELDS=<fieldname>, <fieldname>, Optional. Specifies the fields from the data file that you want to display in each position shape in the organization chart. If you don't specify fields, the wizard displays the employee name. The order in which the fieldnames appear in this list is the order in which they appear in in a shape.
/CUSTOM-PROPERTY-FIELDS=<fieldname> HIDDEN, <fieldname> HIDDEN, Optional. Specifies the fields from the data file that you want to add to the organization chart shapes as property fields. If you don't specify fields, the wizard adds no property fields.

For example, your data file might include fields for department name, telephone number, and office number. By adding these fields as property fields to the organization chart shapes, you allow users of the organization chart to access the data in these fields by right-clicking the shapes representing employees. Optionally, you can insert the HIDDEN modifier after fieldnames that you don't want users of the organization chart to see. For example, in an organization chart for your department, you can store employee position grade levels as a hidden property.

/LINK-TO-DB Valid only when /DATASOURCE and /CUSTOM-PROPERTY-FIELDS are also specified. Not required if you specify LINK-PAGE-ACTIONS or LINK-SHAPE-ACTIONS. Specifies that you want to establish a link between the datasource that contains your organization data and the organization chart drawing. When a link is in place, you can pass changes that you make in the datasource to the drawing, and vice versa.

When the link is in place, the default page and shape actions include UPDATE-SHAPES-ONOPEN, UPDATE-RECORD, and UDPATE-SHAPE. This means that if you make changes to the datasource, the changes will be passed to the drawing automatically the next time you open the file. You can also pass changes back and forth by right-clicking a shape in the drawing and updating the shape if changes have been made in the datasource, or by updating a cell in the datasource if changes have been made to the shape.

/LINK-PAGE-ACTIONS="/<action>", "/<action>", Valid only when /DATASOURCE and /CUSTOM-PROPERTY-FIELDS are also specified. If you specify LINK-PAGE-ACTIONS, you don't need to use the LINK-TO-DB argument.

Specifies that you want to establish a link between the datasource that contains your organization data and the organization chart drawing. When a link is in place, you can pass changes that you make in the datasource to the drawing, and vice versa. Possible actions:

  • UDPATE-SHAPES means that you can right-click the page and choose this command to pass changes from the datasource to all shapes in the organization chart drawing.
  • UPDATE-DATABASE means that you can right-click the page and choose this command to pass changes from the organization chart drawing to the datasource.
  • UPDATE-SHAPES-ONOPEN means that if you make changes to the datasource, the changes will be passed to the drawing automatically the next time you open the file.
  • UPDATE-SHAPES-ONINTERVAL means that changes to the datasource will be passed to the drawing automatically at the interval you specify.
/LINK-SHAPE-ACTIONS="/<action>", "/<action>", Valid only when /DATASOURCE and /CUSTOM-PROPERTY-FIELDS are also specified. If you specify LINK-SHAPE-ACTIONS, you don't need to use the LINK-TO-DB argument.

Specifies that you want to establish a link between the datasource that contains your organization data and the organization chart drawing. When a link is in place, you can pass changes that you make in the datasource to the drawing, and vice versa. Possible actions:

  • SELECT-RECORD means that you can right-click a shape in the organization chart drawing and select a record in the datasource that you want the shape to represent. The data in the record is passed to the shape.
  • UDPATE-RECORD means that you can right-click a shape in the drawing and choose this command to pass changes that you have made to the shape to a record in the datasource.
  • UPDATE-SHAPE means that if you have made changes to the datasource, you can right-click a shape in the drawing and update the shape to reflect the changes.
  • DELETE-SHAPE-AND-RECORD means that you can right-click a shape in the drawing and choose this command to delete both the shape from the drawing and the record in the corresponding datasource.
/SHOW-DIVIDER-LINE Optional. Specifies that all organization chart shapes will include a divider line that separates one line of display text (such as employee name) from another (such as title). If you don't add this argument, organization chart shapes will not include divider lines.
/SYNC-ACROSS-PAGES Optional. Specifies that all shapes representing the same employee on different pages of the diagram be synchronized, so that changes made to text or properties in one shape will be made in all the shapes.
/HYPERLINK-ACROSS-PAGES Optional. Specifies that all shapes representing the same employee on different pages of the diagram will contain hyperlinks to one another. You can access the hyperlink destination by right-clicking a shape, and then clicking the hyperlink.
/LAUNCHGUI Optional. Specifies that the drawing-definition Organization Chart Wizard pages will be displayed to the user, so that the user can interactively modify the command-line arguments. The user will not be able to change the data source specified in /FILENAME, /DATASOURCE, or /MICROSOFT-EXCHANGE.


© 2009 Microsoft Corporation. All rights reserved.