PRJ41: Gantt Bar Date Format Incorrect When Copied from Project (160632)



The information in this article applies to:

  • Microsoft Project for Windows 95 4.1
  • Microsoft Project for Windows 95 4.1a

This article was previously published under Q160632

SYMPTOMS

When copying tasks from a Gantt Chart and pasting them as a picture or object into another program, bar text dates in the pasted Gantt Chart image may use the mm/dd/yy hh:mm format instead of the format defined in the project, and bars may not round to whole days even if they do in the project.

CAUSE

When you copy tasks from a Gantt Chart using the Edit menu commands Copy (Cell) or Copy (Task), the date format is ignored for bar text that uses date fields. The selection of Round Bars to Whole Days specified in the Layout dialog is also ignored.

NOTE: These problems do not occur if you use the Copy Picture camera tool to copy the Gantt Chart.

WORKAROUND

To work around this problem, use the method appropriate for your situation.

Method 1

If you only need a picture of the Gantt Chart, and not the object, then select the tasks you want in Microsoft Project and use the Copy Picture camera tool on the toolbar, instead of the Edit menu Copy (Cell) or Copy (Task) commands.

Using the Copy Picture camera tool eliminates both the date format and the bar rounding problems. It is the only method that fixes the bar rounding problem.

Method 2

This method fixes the date format problem when pasting the Gantt Chart as a picture or an object, but does not fix the bar rounding problem. It is the only method that fixes the date format problem if the Gantt Chart is pasted as an object.

NOTE: Pasting as an object can display more tasks than pasting as a picture, and you can also activate the project in Microsoft Project by double clicking the image.

To work around the date format problem, copy the date fields to text fields and define bar text to use the text fields instead of the date fields.

The steps below illustrate how to display Start and Finish dates beside the bars by copying the Start and Finish fields to the Text1 and Text2 fields, and defining bar text to use Text1 and Text2.

  1. Change the date format in the table to the format you want for the Gantt bar text. On the Tools menu click Options, then click the View tab and select the format from the Date Format list. Click OK.
  2. Click the title of the Start field to select the column. On the Insert menu, click Insert Column. Select Text1 from the Field Name list, and click OK. This inserts the Text1 field to the left of the Start field.
  3. Click the title of the Start field to select the column. On the Edit menu, click Copy (Cell).
  4. Click the title of the Text1 field to select the column. On the Edit menu, click Paste.
  5. Repeat steps 2, 3, and 4 to insert the Text2 field to the left of the Finish field, and to copy the Finish field to the Text2 field.
  6. Remove the Text1 and Text2 fields from the table. Click the title of the Text1 field to select the column. On the Edit menu, click Delete Column. Repeat this process to remove the Text2 field from the table.
  7. On the Format menu, click Bar Styles, and then click the Text tab. Click to select the first bar type in the top half of the dialog box. If the Start field appears beside Left, Right, Top, Bottom, or Inside in the Text tab at the bottom of the dialog box, change it to Text1; similarly change Finish to Text2. Repeat this for each bar type in the top half of the dialog box. Click OK.
  8. Change the table date format back to the format you want. On the Tools menu, click Options. Click the View tab and select the format from the Date Format list. Click OK.
  9. Select the tasks to copy. On the Edit menu, click Copy (Cell) or Copy (Task). Switch to the target program. On the Edit menu, click Paste Special and select Microsoft Project ... Project Object or Picture. Click OK.
Date formats in the Gantt Chart image appear in the target program as in the original Project file.

NOTE: If you modify task dates in the project file, you need to repeat steps 1-9 to update the Text1 and Text2 fields before copying tasks to the target program again.

STATUS

Microsoft has confirmed this to be a problem in the versions of Microsoft Project listed above.

MORE INFORMATION

While in a Microsoft Project Gantt Chart view, click Layout on the Format menu to display the Layout dialog. The Layout dialog box contains the settings Date Format for Bars and Round Bars to Whole Days. Click Help for more information about these settings.

Modification Type:MajorLast Reviewed:9/26/2003
Keywords:kbbug kbfix kbinterop KB160632