Changes for Custom Project Guides

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

There are relatively few changes from previous versions in the Project Guide for Microsoft Office Project 2007. However, in addition to some new and changed default Project Guide files that are available for templates, your custom Project Guides require changes in the ClassID property for several objects.

You can use the default Project Guide files as templates for creating your own custom Project Guide content. The Project 2007 SDK download includes all of the default Project Guide files and the updated sample Critical Task custom Project Guide. For a link to the download, see Welcome to the Microsoft Office Project 2007 SDK. For more information about developing custom Project Guide panes and custom views, see Project Guide 101 in the Project 2003 SDK.

This article includes the following sections:

  • ClassID Values for Project Guide Objects

  • Critical Path Custom Project Guide Sample

  • Deploying a Custom Project Guide

    • Installing Locally for One User

    • Deploying to a SharePoint Site

    • Using the Project Guide with a Custom Toolbar in the Enterprise Global Template

  • Changes in the Default Project Guide Files

ClassID Values for Project Guide Objects

Because some object ClassID values have changed, your custom Project Guide solutions that include any of those objects cannot work in Project 2007 until you update the ClassID. Following is an example of how to declare a text converter object in a custom Project Guide.

<object id="TextConv"
    classid="clsid:0F5E0D2C-54F2-41D9-835F-06B3045B7059"
    type="application/x-oleobject"
    style="display: none">TextConv failed to load!
</object>

A Microsoft JScript file for a custom Project Guide, such as interview_controls.js in the Project 2003 SDK, can write HTML code for output to the Web browser control as shown in the following example.

document.write("<p>");
   document.write("<object id=\""+ ID + "\" name=\"Calendar"+ ID + "\"");
   document.write(" classid=\"CLSID:A709EC93-E1F9-4bc4-A9CB-7FDB51CD0EF1\"");
   document.write(" style=\"width: 10em; height: 1.5em;\">");
   document.write("</object>")
document.write("</p>");

The id value of the object is not important because the id is used only for a reference to the object within the HTML or JScript code. The important part is the ClassID, which is used to look up and load that object from the list of ActiveX objects registered with the operating system. Table 1 shows the changes from Project 2003 to Project 2007.

Table 1. Changes in the ClassID for objects in the Project Guide

Object Name

Project 2003 ClassID

Project 2007 ClassID

Text converter

1CFC2250-9B5C-4546-ABA1-1F69A06DCA12

0F5E0D2C-54F2-41D9-835F-06B3045B7059

Document event object

494B3458-3EFF-4C66-9C86-D47670D69634

5500517E-1890-48B4-800E-D9FC609E6DC2

Application event object

04EEB710-3EB7-4B69-9281-E9BBB7B35959

13D338F1-AA3F-444E-A2B7-BC98EFB03484

Date picker

A709EC93-E1F9-4bc4-A9CB-7FDB51CD0EF1

03660567-F7F2-4e2b-A13C-C6607A726AF5

NoteNote

For objects not listed in this table, such as the progress wizard (clsid:0713E8D2-850A-101B-AFC0-4210102A8DA7), the ClassID has not changed in Project 2007.

Critical Path Custom Project Guide Sample

The Critical Path custom Project Guide sample in the Project 2003 SDK does not work with Project 2007 unless you update the sample; however, it is relatively easy to do. The updated version is located in the path Code Samples\ProjectGuide\CriticalPathCustomProjectGuide subdirectory of the Project 2007 SDK download. The files in the sample have the following functions:

  • CritPath.htm contains the calls to JScript methods and the HTML code that controls the Project Guide sidepane content (Figure 1). This file needs no changes.

  • CritPath.js includes the methods that initialize the sidepane, move to the next or previous critical task, apply a style to the critical tasks in the Gantt chart, and update the sidepane when the user selects a task. This file needs no changes.

  • CritPath_help.htm contains the HTML content for help with the Critical Path Project Guide, calls the JScript method to display the help header, and calls the method to navigate back to the Critical Path sidepane when the user clicks Done. The onClick event handler in this file is changed from the Project 2003 version to match the task ID value specified in CritPathSample.xml.

  • CritPathSample.xml includes all of the default Project Guide goal areas and tasks plus the additional task definition for the Critical Path monitor in the Report goal area. This file is changed from the Project 2003 version.

The CritPathSample.xml file is modified from the default gbui.xml file. (Microsoft Project 2002 introduced the Project Guide. One of the pre-release versions was called the Goal Based User Interface.) The gbui.xml file includes the four default goal areas of Tasks, Resource, Track, and Report, plus the 38 task definitions for the goal areas. For example, the first default task in the Report goal area is Select a view or report. The CritPathSample.xml file is simply a copy of gbui.xml with the following definition added as the last task in the Report goal area definition.

NoteNote

The TaskID value must be unique throughout all Project Guide tasks. The highest number task in the default gbui.xml file is 38, so the Critical Path TaskID is set to 39.

<GoalAreaTask>
   <TaskID> 39 </TaskID>
   <Title> Critical path monitor </Title>
   <TaskName> Monitor the critical path </TaskName>
   <URL> pgcontent://critpath.htm </URL>
   <TaskHelp>
      <HelpName> More Information </HelpName>
      <URL> pgcontent://critpath_help.htm </URL>
   </TaskHelp>
   <RelevantViews>
      <ViewName> Gantt Chart </ViewName>
   </RelevantViews>
</GoalAreaTask>

The URL values of the task content and help content in the Project Guide sidepane use the pgcontent:// custom protocol. For example, if you configure Project to use a custom Project Guide located in the path C:\CustomPG, Project expands pgcontent://critpath.htm to C:\CustomPG\critpath.htm.

The other change from the Project 2003 version is in the CritPath_help.htm file. The following code defines the Done link in the help content. The first two parameters in the pNavigate method are GoalArea and TaskID. In the updated CritPath_help.htm file, the GoalArea value remains 4 (Report), and the TaskID value is changed to 39 to match the task definition in the CritPathSample.xml file.

<a title="Done" id="GoBack" class="trigger" href="#"
   onClick="pNavigate(4,39,'GoBack')">
   Done
</a>

Figure 1. Custom Project Guide for the critical path

Custom Project Guide for the critical path

Deploying a Custom Project Guide

There are several ways to deploy and install custom Project Guides. This article shows how to install the Critical Path Project Guide locally for one user of Project Standard or Project Professional, and how to deploy and install the Project Guide for all users with access to a specific SharePoint site. For more information, see Deploying a Custom Project Guide in the Project 2003 SDK.

Installing Locally for One User

Procedure 1 shows a way to install the Critical Path sample on a local computer for one user.

Procedure 1: To install and use the Critical Path custom Project Guide locally:

  1. Copy all of the files for the custom Project Guide to a directory on your computer. For example, create a directory named C:\CustomPG, and then copy the four Critical Path custom Project Guide files to that directory.

  2. Start Project, and then set macro security to medium or low. On the Tools menu, click Options, click the Security tab, and then click Macro Security to open the Security dialog box. Exit Project after you set macro security.

  3. Start Project again, and then create a test project with some tasks, as shown in earlier in Figure 1.

  4. Press ALT-F11 to open the Visual Basic Editor, expand the ProjectGlobal (Global.MPT) node in the Project Explorer pane, and then double-click ThisProject (Global.MPT) to open the code pane.

  5. Paste the following code into the code pane.

    Option Explicit
    
    Sub SetProjectGuide()
        Dim url4Layout As String
        Dim url4Xml As String
    
        If Projects.Count = 0 Then
            MsgBox "You must have at least one active project open to set custom Project Guide files."
            Exit Sub
        End If
    
        Application.OptionsInterfaceEx DisplayProjectGuide:=True _
        '    ProjectGuideUseDefaultFunctionalLayoutPage:=True, _
        '    ProjectGuideUseDefaultContent:=False
    
        If (ActiveProject.ProjectGuideUseDefaultContent = True) Then
            'Set url4Xml to URL of XML document defining content.
            url4Xml = "C:\CustomPG\CritPathSample.xml"
    
            'Set url4Layout to the URL of HTML page defining layout and functionality.
            'url4Layout = ""
    
            With ActiveProject
                .ProjectGuideUseDefaultContent = False
                .ProjectGuideContent = url4Xml
    
                .ProjectGuideUseDefaultFunctionalLayoutPage = True
                '.ProjectGuideFunctionalLayoutPage = url4Layout
            End With
        End If 
    End Sub
    
    NoteNote

    The last two settings in Application.OptionsInterfaceEx duplicate the same settings in the With ActiveProject block. You can use either group of settings.

    The Critical Path custom Project Guide requires only an option setting change to use a different XML file for custom goal area and task content. All of the other Project Guide functionality and layout content uses the default files.

  6. Save and then close the Visual Basic Editor.

  7. Run the SetProjectGuide macro. For example, on the Tools menu, click Macro, and then click Macros. In the Macros dialog box, select Global.MPT!SetProjectGuide, and then click Run.

    NoteNote

    In Figure 1, the Set Project Guide custom button on the toolbar is assigned the SetProjectGuide macro. The toolbar button works if the macro is in Global.MPT, but the button does not work if the macro is in the local project.

  8. To determine whether the macro changed settings for Project, open the Options dialog box (Tools menu), and then click the Interface tab. Display Project Guide should be selected. The Use custom content option should be selected under Project Guide Content, and the value C:\CustomPG\CritPathSample.xml should be in the XML file for custom content text box.

  9. Click Report on the Project Guide toolbar or click the down arrow to the right of Report to see the Project Guide task list for that goal area. You can then click Monitor the critical path in the Report sidepane or in the task list.

Deploying to a SharePoint Site

To make the custom Project Guide files easily available to multiple Project Professional users in a project team, a department, or an entire organization, you can copy the files to a SharePoint document library that is accessible to the users. Procedure 2 shows how to deploy the Critical Path custom Project Guide to a project team site. Procedure 3 then shows how to create a custom toolbar button in the enterprise global template that installs the Project Guide.

Procedure 2: To deploy and use the Critical Path Project Guide on a SharePoint site:

  1. Copy the custom Project Guide files to a Shared Documents library that is accessible to the project team. For example, if the top-level SharePoint Web site for the team is http://ServerName/default.aspx, upload the files to http://ServerName/Shared%20Documents/Forms/AllItems.aspx.

    1. On the Shared Documents page of the project team site, click Upload, and then click Upload Multiple Documents.

    2. Browse to C:\CustomPG (or the location of the files), select the four Critical Path files (critpath.htm, critpath.js, critpath_help.htm, and CritPathSample.xml), and then click OK.

  2. On the Shared Documents page, click CritPathSample.xml and open it in Read Only mode. Copy the URL of the file, for example, http://ServerName/Shared%20Documents/CritPathSample.xml.

  3. Change the value of the url4Xml variable in the SetProjectGuide macro as shown in the following line.

    url4Xml = "http://ServerName/Shared%20Documents/CritPathSample.xml" 
    

Using the Project Guide with a Custom Toolbar in the Enterprise Global Template

To give multiple Project Professional users easy access to the custom Project Guide in the SharePoint document library, you can create a custom toolbar and button in the enterprise global template.

NoteNote

The Knowledge Base (KB) article 913678 How to make a custom toolbar available to all users in Project Professional 2003 or in Project Professional 2002 also generally applies to Project Professional 2007. Project Server 2007 does not include an actual project template named Enterprise Global. What is usually referred to as the enterprise global template is actually binary data in a set of tables in the Published database. The steps in Procedure 3 are modified from the KB article.

Procedure 3: To create a custom toolbar in the enterprise global template for the Critical Path Project Guide:

  1. Copy the module that includes the SetProjectGuide macro to the enterprise global template. You must copy the macro from Global.MPT to another project module before copying it to the enterprise global template.

    1. Start Project Professional, log on to your Project Server profile, and then open the Visual Basic Editor for the empty Project1. Make sure the macro security level is set to medium or low.

    2. In the left pane of the Visual Basic Editor, expand the nodes under VBAProject (Project 1). Right-click VBAProject (Project 1), and then insert a new module.

    3. Expand the ProjectGlobal (Global.MPT) nodes, open ThisProject (Global.MPT), and then copy the SetProjectGuide macro.

    4. Double-click Module1 of VBAProject (Project1), and then paste the macro into Module 1. You do not have to save Project1; just keep it open until you have completed the next steps.

    5. Rename the VBA module. Click in the Project Professional window with Project1 open, and then click Organizer on the Tools menu. Click the Modules tab, select Project1 in the left drop-down list, click Module1 in the left column, and then click Rename. For example, rename Module1 to CustomProjectGuides. Close the Organizer dialog box.

    6. On the Tools menu, point to Enterprise Options, and then click Open Enterprise Global. If you have set the macro security level to medium and you see a Security Notice dialog box, click Enable Macros.

    7. With the Checked-out Enterprise Global project open, open the Organizer dialog box again. Click the Modules tab, select Project1 in the left Modules available in drop-down list, and then click CustomProjectGuides in the left column.

    8. In the Modules available in drop-down list on the right side, select Checked-out Enterprise Global, and then click Copy. Close the Organizer dialog box.

    9. Save the enterprise global template, and then exit Project Professional. To use macros in the enterprise global template, you must restart Project Professional.

  2. Create a custom toolbar and button in a new Project1, and then assign the SetProjectGuide macro in the enterprise global template to the button.

    1. Start Project Professional and log on your Project Server profile. If you see the Security Notice dialog box, click Enable Macros. Project Professional creates a new Project1.

    2. On the Tools menu, point to Customize, and then click Toolbars.

    3. On the Toolbars tab, click New, and then type a name in the New Toolbar dialog box. For example, type CustomPG. Click OK in the New Toolbar dialog box to create an empty floating toolbar.

    4. Click the Commands tab, and then click All Macros in the Categories list. The Commands list then shows the SetProjectGuide macro that you copied to the enterprise global template.

      NoteNote

      Macros with the Global.MPT! prefix are in the local Global.MPT template, not in the enterprise global template. If you open the Visual Basic Editor and expand the Modules node under VBAProject(Global(+ non-cached Enterprise)), you can see that the CustomProjectGuides VBA module contains the SetProjectGuide macro.

      You do not need to reopen the enterprise global template to do the next step.

    5. Drag the SetProjectGuide macro from the Commands list to the floating CustomPG toolbar, right-click the new macro button on the toolbar, and then click Image and Text if you want to show both an icon and text name for the button. You can also change the button name and image.

    6. Click the CustomPG title bar on the floating toolbar, drag it to the toolbar pane, and then dock the toolbar where you want. Close the Customize dialog box.

    7. Test the CustomPG toolbar. Click the button to run the SetProjectGuide macro, and then check the Report goal area to see the Monitor the critical path task. Because you have made no changes to the enterprise global template in Step 2, you do not need to close Project Professional to do Step 3.

  3. Copy the CustomPG toolbar to the enterprise global template, to make it available to all Project Professional users.

    1. With the unsaved Project1 project still open, open the enterprise global template.

    2. With the Checked-out Enterprise Global project open, click Organizer on the Tools menu, and then click the Toolbars tab.

    3. In the Toolbars available in drop-down list on the left side of the Organizer dialog box, select Global (+ non-cached Enterprise).

    4. In the drop-down list on the right, select Checked-out Enterprise Global.

    5. In the left list, click the CustomPG toolbar entry, and then click Copy. Close the Organizer.

    6. Save and then close the enterprise global template.

    7. Exit Project Professional.

    8. Go to a different computer, start Project Professional, log on using the same Project Server profile to verify the new CustomPG toolbar, and then test the SetProjectGuide macro.

      NoteNote

      Before you can use the macro, you must set macro security to medium or low.

Changes in the Default Project Guide Files

The installation of Project 2007 Standard or Professional includes the pjintl.dll file in the path [Program Files]\Microsoft Office\Office12\1033. The pjintl.dll file contains the default Project Guide files for use by the Project client. For information about how to access the Project Guide files within pjintl.dll by using the res protocol, see Custom Protocols and Localization in the Project 2003 SDK.

Table 2 shows differences in the list of default Project Guide files. Following are the main directories for the default Project Guide files.

  • Error_pages contains the general HTML pages for security and navigation errors.

  • Images contains the .gif files for Project Guide sidepanes.

  • Ooui contains Smart Tag pages.

  • Pages contains subdirectories for the primary HTML pages for the Project Guide sidepanes.

  • Scripts contains the JScript files that the HTML pages refer to.

  • Styles contains the cascading style sheet (.css) files.

  • Xml contains the primary definitions for the default Project Guide goal areas, tasks, and relevant views.

The main default Project Guide file directories are the same for both Project 2003 and Project 2007, but the pages directory has four new subdirectories (commitments, deliverables, importproject, and importresource).

NoteNote

Commitments and deliverables refer to the same feature. As in the VBA object model for Project, some of the default Project Guide names still use the Commitments name from pre-release versions.

The deleted files are available in Project 2003, but do not work with Project 2007. If you have a custom Project Guide that is based on one of the deleted files as a template, you must adapt the custom file to match one of the new or updated Project Guide files.

Generally, the list of modified files have minor changes, if any. For example, some JScript files have an additional function. HTML files include the DIR="LTR" attribute in the <html> tag, some have changed ClassID values, and some have minor text changes. However, if your custom Project Guide is based on one of the modified HTML or JScript files, you should check whether you need to update custom pages and scripts for Project 2007. The list of modified files does not include files that have only changed comments.

Table 2. Changed default Project Guide files for Project 2007

Subdirectory

Deleted Files

New Files

Modified Files

Error_pages

generic_security_error.htm

login_error.htm

login_ntrusted.htm

login_version.htm

naverror.js

pc_security_error.htm

Images

blank.gif

chkmrk.gif

delete.gif

edit.gif

ichtm.gif

linksf.gif

marr.gif

marrrtl.gif

mgrad.gif

mgradrtl.gif

newitem.gif

next.gif

prev.gif

redo.gif

rtednar.gif

close.gif

closelit.gif

gantt_bar.gif

hierarch.gif

redbar.gif

schd_base.gif

Ooui

set_relation.htm

set_relation.js

customize_assignment.htm

deadlines.htm

deadlines.js

Pages

sp_template.htm

mainpage_wp.htm

task_auditor.htm

error.htm

error2.htm

error3.htm

mainpage.htm

right.htm

server.htm

wrapper.htm

Pages\Commitments

commitments_main.htm

Pages\Deliverables

menu.htc

Pages\ImportProject

import_project_wizard.htm

Pages\ImportResource

import_resources_wizard.htm

save_resource_errors.htm

Pages\Report

compare_progress.htm

compare_progress_hlp.htm

critical_path.htm

critical_path_hlp.htm

filter.htm

filter_hlp.htm

format_gantt.htm

format_gantt_hlp.htm

multiple_status.htm

print_view.htm

project_costs.htm

project_costs_hlp.htm

report_main.htm

report_risks.htm

resource_alloc.htm

resource_alloc_hlp.htm

select_report.htm

select_report_hlp.htm

Pages\Resources

list_hlp2.htm

assign.htm

assign_hlp.htm

booking.htm

booking_hlp.htm

list.htm

list_hlp.htm

more_res_fields.htm

more_res_fields_hlp.htm

more_res_info.htm

more_res_info_hlp.htm

resources_main.htm

work_hours.htm

Pages\Tasks

publish_project_cachetest.htm

additional_calendar.htm

add_documents.htm

add_more_info.htm

add_more_info_hlp.htm

add_risks.htm

apply_outline.htm

apply_outline_hlp.htm

create_tasks_list.htm

create_tasks_list_hlp.htm

define_project.htm

load_projcentral_right.htm

more_data_fields.htm

more_data_fields_hlp.htm

project_calendar.htm

project_calendar_prev.htm

publish_project.htm

publish_project_cachetest.htm

publish_project_hlp.htm

setup_pc.htm

set_deadlines.htm

set_deadlines_hlp.htm

set_relationships.htm

set_relationships_hlp.htm

tasks_main.htm

Pages\Track

make_plan_changes.htm

request_report.htm

save_baseline.htm

save_baseline_hlp.htm

setup_tracking.htm

track_issues.htm

track_main.htm

track_progress.htm

track_progress_hlp.htm

update_progress.htm

update_progress_hlp.htm

Scripts

commitments.js

common.js

common_server_sidepane.js

deliverable_events.js

deliverable_main.js

deliverable_render.js

deliverable_utilities.js

import_project_wizard.js

import_resources_wizard.js

mainpage_wp.js

save_resource_errors.js

task_auditor.js

add_documents.js

add_risks.js

additional_calendar.js

booking.js

compare_progress.js

create_task_list.js

critical_path.js

define_project.js

filter.js

list.js

mainpage.js

make_plan_changes.js

more_data_fields.js

more_res_fields.js

multiple_status.js

project_calendar.js

project_costs.js

publish_project.js

report_risks.js

request_report.js

resource_alloc.js

save_baseline.js

select_report.js

set_relationships.js

setup_pc.js

setup_tracking.js

track_issues.js

track_progress.js

update_progress.js

util.js

work_hours.js

wrapper.js

Styles

menu.css

proj_cal.css

projie.css

Xml

fields_data.xml

gbui.xml

gbui_s.xml

See Also

Concepts

Project Deliverables

Other Resources

Project Guide 101

Deploying a Custom Project Guide

How to make a custom toolbar available to all users in Project Professional 2003 or in Project Professional 2002