## Only First 255 Characters in String Argument Recorded in Macro

Q113000

The information in this article applies to:

- Microsoft Project for Windows, version 4.0
- Microsoft Project for the Macintosh, version 4.0

## SYMPTOMS

In Microsoft Project, when you record a command that has a string argument, only the first 255 characters in the string are recorded.
For example, if you turn on the macro recorder and assign a large number of resources to a task, the ResourceAssignment method is recorded, but only the first 255 characters of the resources you assigned are recorded in the Resources argument.

## WORKAROUND

To record your macro correctly, avoid exceeding the 255 character limit for a string argument. To do this, repeat the command that has the long string argument using smaller arguments.
For example, if you want to record a macro that assigns a large number of resources to a task, you can repeatedly assign a selection of the resources instead of assigning all of the resources at once. To do this, select a range from the list of resources and choose Assign. The selection of resources must contain fewer than 255 characters. Repeat this procedure until all the resources are assigned.

## MORE INFORMATION

### Steps to Reproduce Behavior

1. In a new project, choose Resource Sheet from the View menu.
2. Enter 20 distinct resources, each with 5 character names.
3. From the View menu, choose Gantt Chart. In the Gantt chart, enter a task.
4. From the Tools menu, choose Record Macro. Choose the Options button, and under Store Macro In, select the Current Project File option. Choose OK.
5. Select the task you entered in Step 3, and from the Standard toolbar, select the Resource Assignment button.
6. In the Resource Assignment dialog box, select the first resource, hold down the SHIFT key, and select the last resource in the list. Choose Assign. Choose Close.
7. From the Tools menu, choose Stop Recorder.
8. From the Tools menu, choose Macro. From the Macro Name list, select the name of the macro you recorded in Step 4 and choose Edit.

Note that the Resources argument of the ResourceAssignment command does not contain the entire list of resources. When you run this macro, it does not assign all the resources to a task even though this is the action that you recorded.

Additional query words:

Keywords : kbmacro kbusage
Issue type : kbbug
Technology : kbHWMAC kbOSMAC kbProjectSearch kbProject400Mac kbProjectMacSearch kbProject400

Last Reviewed: November 5, 2000 © 2001 Microsoft Corporation. All rights reserved. Terms of Use.