Friday, June 12, 2020

Record a macro

If you perform a task repeatedly in Microsoft Office Project, you can automate the task with a macro. A macro is a series of commands and functions that are stored in a module and can be run whenever you need to perform the task.

  1. On the View tab, click Macros, and then click Record Macro.

    (In Project 2007, on the Tools menu, point to Macro, and then click Record New Macro.)

  2. In the Macro name box, type a name for the macro.

    The first character of the macro name must be a letter. Other characters can be letters, numbers, or underscore characters. Blank spaces are not allowed in a macro name, but the underscore works well as a word separator.

  3. To be able to run the macro by pressing a shortcut key, enter a letter or key combination in the Shortcut key box.

    You can use CTRL+letter (for lowercase letters) or CTRL+SHIFT+letter (for uppercase letters), where letter is any letter key on the keyboard, but not a number or special character. You cannot use a key combination that is already in use in Microsoft Office Project.

  4. In the Store macro in list, click the location where you want to store the macro:

    • To make the macro available whenever you use Project, click Global File.

    • To make the macro available for the current project only, click This Project.

  5. To include a description of the macro, type the description in the Description box.

  6. If you select cells while recording a macro, the macro will select the same column (field) each time it is run, regardless of which cell is first selected, because it records absolute references to columns. If you want a macro to select columns regardless of the position of the active cell when you run the macro, click Relative under Column references.

    Conversely, the macro will select rows regardless of the position of the active cell when you run the macro because it records relative references to rows. If you want a macro to always select the same row, regardless of which cell is first selected, click Absolute (ID) under Row references.

    Note: Project continues to use these settings while recording macros until you either change the settings or close Project.

  7. Click OK, and then perform the actions that you want to record.

  8. When you have completed all of the actions that you want to record, on the View tab, click Macros, and then click Stop Recording.

    (In Project 2007, on the Tools menu, point to Macro, and then click Stop Recorder.)

Security Note:  Because macros can contain viruses, be careful about running them. Take the following precautions: run up-to-date antivirus software on your computer; set your macro security level to high; clear the Trust all installed add-ins and templates check box; use digital signatures; maintain a list of trusted publishers.

No comments:

Post a Comment