Adding Document Routing to an Application

Document routing — adding a Route command or another form of document routing support to a File menu in a document-based application — can be used for many purposes, but all involve defining a list of people who are to read and act on information in the document in a specific order.

The following discussion assumes you want to base your routing application on an existing document-based application. If you prefer to base it on a messaging client, see also Creating a New Interpersonal (IPM) Message Class.

Design Tasks

  1. Decide whether to use Simple MAPI, CMC, MAPI, or the Active Messaging Library. See Selecting a Client Interface.

    If your application requires routing across messaging domain boundaries, you must use MAPI or the Active Messaging Library and store the routing information in named properties on the message. See Sending Across Messaging Domains. If you use the Active Messaging Library, the routing information must be stored in the message's Fields collection using five special property sets. See Customizing a Folder or Message and Fields Collection Object.

    If you choose to use Simple MAPI or CMC, the routing information can be stored in a file attached to your message. For Simple MAPI, see Handling Attachments with Simple MAPI. For CMC, see Handling Attachments with CMC.

  2. Design the message properties and the commands — called "verbs" in MAPI — specific to your routing functionality.

Implementation Tasks

  1. Choose the message class name. It should begin with IPM. See Message Classes.
  2. Use the MAPI address book dialog box to let the user add names to the routing list. See the IAddrBook::Address method and ADRPARM and ADRLIST structures.
  3. Store the routing list in the message, an attached file, or the document itself, as appropriate.
  4. Support your routing verbs with message — or document — properties that refer to entries in the routing list.

About Sample Source Code

See the following topics:

Sample Routing Client

Sample Timecard Application