Article ID: 146625
Article Last Modified on 11/13/2003
APPLIES TO
- Microsoft Project 4.0 Standard Edition
- Microsoft Project 4.1 Standard Edition
- Microsoft Project 4.0 for Macintosh
This article was previously published under Q146625
SUMMARY
The Header/Footer print codes that are available when setting up Header,
Footer, or Legend Text information do not include a code to add a project's
keywords.
WORKAROUND
You can place keywords into the header and/or footer using the following
methods.
Method 1
Copy the project's keywords and paste them into the appropriate Header,
Footer, or Legend Text location.
For example, to get the keywords centered in the header of your project
when using Microsoft Project for Windows version 4.0, do the following:
- On the File menu, click Summary Info.
- Select the Document section.
- Highlight all the text in the Keywords box.
- Press and hold CTRL+INSERT or CTRL+C to copy the highlighted text. Click
OK.
- On the File menu, click Page Setup. Select the Header section.
- Click the Center tab and click in the white box below the tab.
- Press and hold SHIFT+INSERT or CTRL+V to paste the copied text.
- Click OK.
Method 2
By using the Keywords Property in a macro you can have Microsoft Project
automatically place the keywords for your project into the Header, Footer,
or Legend Text area of the Page Setup dialog box. The Keywords Property is
part of the Project Object model within Visual Basic for Applications.
The following sample macro will provide the means to get the keywords from
the active project and place them into the center header of the active
view.
Microsoft provides macro examples for illustration only, without warranty
either expressed or implied, including but not limited to the implied
warranties of merchantability and/or fitness for a particular purpose.
This macro is provided 'as is' and Microsoft does not guarantee that the
following code can be used in all situations. Microsoft does not support
modifications of the code to suit customer requirements for a particular
purpose.
Sub Get_Keywords()
FilePageSetupHeader Center:= ActiveProject.Keywords
End Sub
If you want to have the keywords shown aligned to the left or right in the
header, replace the word "Center" with the word "Left" or "Right"
respectively.
To ensure that the keywords in the header are up to date, run the macro
before printing.
The above macro can also be attached to a menu item or toolbar button where
the command for the menu or button will be:
FilePageSetupHeader Center:=ActiveProject.Keywords
For additional information on creating custom buttons or menus, search on
the words "toolbar buttons" or "menu bars" in the Microsoft Project help.
Additional query words: Find File
Keywords: KB146625