Assigning a macro to a menu command

Maybe you're not a toolbar person, or maybe you just prefer to use menu commands. This section shows you how to add a command that's assigned to a macro to the Tools menu.

As with toolbars, be aware that adding commands to the menus that come with Project isn't always a good idea. If you add a command to one of the standard menus and you reset that menu, the command that you added will disappear.

You can also add commands for macros to custom menus that you create, and if you don't want your custom menu to appear all the time, you can create a custom toolbar and drag menus onto it. Then you can hide or display the toolbar as needed.

See Chapter 20 for more information about creating custom menus and toolbars

Follow these steps to add a command that runs your macro from a menu:

1. Choose ViewOToolbarsOCustomize to open the Customize dialog box.

Tip You also can open the Customize dialog box by choosing ToolsoCustomizeo

\ Toolbars.

2. Click the Commands tab, as shown in Figure 24-11.

Cross-Reference

Figure 24-11: You can add macros as commands on menus by using the Commands tab of the Customize dialog box.

3. Scroll down the Categories list, and select All Macros. Project displays a list of macros in the Commands list on the right.

4. Drag the macro that you want to add to the desired menu, as shown in Figure 24-12. As you drag, the mouse pointer image changes to include a small button and a plus sign (+). As you move the mouse pointer over a menu, the menu opens; a large horizontal insertion point marks the location where the button will appear when you release the mouse button.

5. Release the mouse button. The macro appears on the menu, as shown in Figure 24-13.

¿1 Microsoft Project Projorril

■3.1 EMe Edit View Insert Format

Id

ofs Project Collaborate yvindow Help

Type a Question for help

- 9 X

! J .J Al .4.A? A ii A J

1?

Spelling... F7 AutoCorrect Options... Shared Workspace Links Detween Projects... [inport Outlook Tasks...

;ijj Detail Form *.;■»)

¿a SI""»* 1

1

e

Task Nsrre

Customiz

s

■Jul 13, '03

Jo

20, 'IÏ »

Toofears

Change Working Time...

it

a

s

v1 T M ; T IF

s

T

Assign Resources... AH+F10

command

§i

Build Team from Enterprise... Ctrl+T Substitute Resources... Resource Sharing ► Level Resources...

Tracking ►

lateacrie

Drawing

Web Utiity Tracking Network

'-1 £ to

Macro ►

All Forms

Organizer,., W3

Enterprise Options ►

Mcdfy 5i

±r

Close

i

jJ jlU

• -HI

KT

NUN

SC«,

I

Figure 24-12: The image of the mouse pointer icon changes as you drag a macro onto a menu.

Figure 24-12: The image of the mouse pointer icon changes as you drag a macro onto a menu.

6. To change the name of the macro on the menu, click Modify Selection in the Customize dialog box to open the pop-up menu, as shown in Figure 24-14.

7. Type the name (including spaces, if you want) in the Name box, exactly as you want it to appear on the toolbar button.

Alt-T opens the Tools Menu so Alt-T-D opens the tools menu and selects the item in that menu with D as the hot key. JmpTo provides a hotkey character for your macro name, place an ampersand (&) immediately before the character that you want to be the hotkey—as I did before the D of Detail in Figure 24-14. If your macro name contains a number, you can make it the hotkey character using the same technique. Make sure that the letter you select is not already in use by some other command on the same menu. When the command appears on the menu, the hotkey character will be underscored, enabling you to choose the command from the menu by pressing the hotkey character combination. For example, I can choose the Detail Form command by pressing Alt+T+D. Alt-T opens the Tools menu, and D selects Detail Form, the item in that menu with D as the hot key.

8. Press Enter. The pop-up menu disappears, and Project renames the menu command. As Figure 24-15 shows, the command includes your hotkey if you added an ampersand.

¿1 Microsoft Project Project 1

Eile Edit View insert Format

lo

ote Project Collaborate yvindow Help

rype a question for help

- 9

K

: j J a mea-ajyi a ^ -a J

Spelling... F7 AutoCorrect Options... Shared Workspace

;ijj Detail Form s')

k

* -v *

±B SI""»* 1

A

£ I Ä fe

Links Between Projects... Import Outlook Tasks...

e

Task Name

Customiz

■Jul 13, '03

Jul 20,91 »

To add a c command

Change Working Time...

Is

a

ä

v1 TlWitiF

H

w r

Assign Resources... AH+F10 Build Team from Enterprise... Ctrl*T Substitute Resources... Resource Sharing ► Level Resources...

Tracking *

Categoric

Drawing

Web Utilty Tracking Network

'-i

Macro >

AJl Forms

Task Detail Form View

Organizer...

Customize ► Options...

Enterprise Options ►

J

i

I

i

Jj _JÜ_j

• -ill

NUN

Figure 24-13: A macro has been placed on the Tools menu.

Figure 24-14: Modifying the command name on the menu.

■4

Mirr

nstffi

rai.cf-Wtejn

usía

■a.l EMe Edit View Insert Fnrmst

loofs Project £nllallí!race Window Help Type a question far help

• I? X

Ld i Ai J ¿3- A u

i ^

V

Spelling...

FT

-i r

| Detail Form

» ;

i

Show I «tí

Auto Correct Options...

iaL

■H

Shared Workspace

O

Task Name

Du

Links Between Projects... Import Outlook Tasks...

' T ¡ F J S

s Im t ;w:t Fis

Jul 20 ,'ac i SjM|T —

1

Change Working Time...

£

Assign Resources

Ah.no

Bui id Team from Enterprise... Ctrl+T Substitute Resources...

a

9

Resource Sharing

»

Level Resources..

% r.

Tracking

>

E

Macro

t

Iii-.:

(U

Detail Form

Organizer...

»

Options...

Enterprise Option

■ ■

¡f 1

*

i

_lU

This macro dsplays the Task Oetab Form in the lower pane wfrl

te

NUM

Figure 24-15: The command after renaming it and assigning it a hotkey.

Figure 24-15: The command after renaming it and assigning it a hotkey.

9. Close the Customize dialog box.

When you add a command to one of the default menus, Microsoft Project saves the command and the menu in your Global template file. Any other project file that you open on your computer using that Global template file contains the new menu command.

Tip If you change your mind and don't want the command on the menu, you can remove it by opening the Customize dialog box and then simply dragging the * command off the menu and dropping it anywhere on your project. The command disappears, but the macro is still available.

Project Management Made Easy

Project Management Made Easy

What you need to know about… Project Management Made Easy! Project management consists of more than just a large building project and can encompass small projects as well. No matter what the size of your project, you need to have some sort of project management. How you manage your project has everything to do with its outcome.

Get My Free Ebook


Post a comment