Project Guide Editor

The Project Guide Editor sample is part of the Project Guide 101 download for Microsoft® Office Project 2003. The Project Guide Editor is itself a custom Project Guide that helps you create goals and tasks, specify related tasks, and add view and page changes for your own custom Project Guide. It can also add the content of an existing Project Guide to the one you're editing.

The following figure shows the PG Editor goal area side pane, and tasks for the Project Guide Editor.

Project Guide Editor

Project Guide Editor

Installing and Using the Project Guide Editor

When you execute the pj11ProjectGuide101.exe download file, the Project Guide Editor sample files are installed in the following default path:

[Program Files]\Microsoft Office 2003 SDKs\Microsoft Office Project 2003 SDK\Project Guide 101\Samples\CustomProjectGuides\PGEditor

To use the Project Guide Editor:

  1. Start Project 2003, and then open the sample_pgeditor.mpp file.

    The sample_pgeditor.mpp project has the Project Guide options set correctly to the default directory where spt.xml is installed by the download. The spt.xml file is the XML definition of the Project Guide Editor, and the directory options set the directory value that the pgcontent:// protocol uses.

  2. Click PG Editor on the Project Guide toolbar. The toolbar includes the four default Project Guide goal areas and related tasks, in addition to the new PGEditor goal area.

You can now use the PG Editor wizard to create or edit a custom Project Guide. You can also create custom content for the Project Guide programmatically with Microsoft Visual Basic® for Applications (VBA), using the Application.OptionsInterface method. For more information, see OptionsInterface Method in the Microsoft Office Project Visual Basic Reference.

Note  If you install the sample files to a different directory, you must change the Project Guide directory options. The sample Project Guide Editor uses the pgcontent:// custom protocol available in Microsoft Office Project 2003, so that files can be installed in other directories or network shares. The Project Guide Editor files in the download do not work with Microsoft Project 2002, which requires hard-coded paths.

To change the Project Guide directory options:

  1. Start Project, and then open the sample_pgeditor.mpp project.
  2. On the Tools menu, click Options. In the Options dialog box, click the Interface tab.
  3. In Project Guide Content, click Use custom content, and then type or paste the path to spt.xml into the URL box that appears.
  4. Click OK. The Project Guide refreshes to show the PG Editor side pane, and the PG Editor goal area of the Project Guide toolbar.

Note  The Project object includes the properties ProjectGuideContent and ProjectGuideFunctionalLayoutPage that store the directory paths for the Project Guide custom content or a custom page specified in the Options dialog box. You can get and set the property value programmatically, for example:

   ActiveProject.ProjectGuideContent = "[ProjectSDKpath]\Project Guide 101\" _
      & "Samples\CustomProjectGuides\PGEditorspt.xml"

Files for the Project Guide Editor

The following table briefly describes the files for the Project Guide Editor custom Project Guide.

File Description

common.js

Contains code common to most of the script files in the project. This includes the code that adds and removes items from the Project Guide XML schema.

gbuiedit.css

Style sheet for the Project Guide Editor.

preview_pane.js

Contains script functions that dynamically render the HTML for preview.

saving.js

Contains the script functions that save the XML schema to disk, and that generate default content for pages.

spt.htm

The startup page for the Project Guide Editor. This page has the links for loading a Project Guide for editing, starting the wizard, and creating new content.

spt.xml

The primary XML schema (definition) of the Project Guide Editor.

sptwiz.htm
sptwiz.js

HTML content and scripts for the wizard that guides the user through creating a Project Guide.

xml_edit.htm
xml_edit.js

HTML content and scripts for the leftmost pane, including the treeview and save/merge/test options. All of the events for the treeview control are handled here, as well as the functionality for links on the page. The files also include the HTML content and scripts for the Create a new XML schema page, and for the Merge XML page.

xml_frames.htm

Contains the frameset definition, and references to scripts for frame content.

xml_load.htm

HTML content for the Load XML side pane.

xml_menu.htm
xml_menu.js

HTML content and scripts for the main working area, where all of the properties for goal areas and tasks are modified.

xml_reference.htm
xml_reference.js

HTML content and scripts for the merge pane that pops up after a user has loaded an XML schema for merging. The files also contain all of the Microsoft JScript® code to merge the XML schemas.

*_template.htm
*_template.js

Template files that are used to create default content for new goal areas and tasks.

*.gif

Graphic files used on the pages.