Microsoft KB Archive/139837

= PRJ: "Run-Time Error" If File Name Extension Not Included =

Article ID: 139837

Article Last Modified on 1/19/2007

-

APPLIES TO


 * Microsoft Project 98 Standard Edition
 * Microsoft Project 4.1 Standard Edition

-



This article was previously published under Q139837



SYMPTOMS
In Microsoft Project, when you use certain Visual Basic for applications methods that take a file name argument, you receive the following error message:

Run-time error 1004



CAUSE
This problem occurs if you fail to include the file name extension with the file name. This problem occurs with the following methods:

OrganizerDeleteItem

OrganizerMoveItem

OrganizerRenameItem

ResourceCalendarEditDays

ResourceCalendarReset

ResourceSharing

ResourceSharingPoolAction

WindowActivate

WindowHide

NOTE: These methods use various arguments for the file name including fileName, filename, projectName, name, and windowName. With other methods (such as FileOpen), you do not need to include a file name extension for the file name argument.



RESOLUTION
To resolve this problem, include the extensions in the file name arguments when you use these methods.

NOTE: One way to do this is to use the FullName property to get the project file name. The FullName property returns the full path, file name, and extension of the file.



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

Keywords: kbbug kbcode kbpending kbusage KB139837

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.