ID: Q175026
The information in this article applies to:
IMPORTANT: This article contains information about editing the registry. Before you edit the registry, make sure you understand how to restore it if a problem occurs. For information about how to do this, view the "Restoring the Registry" Help topic in Regedit.exe or the "Restoring a Registry Key" Help topic in Regedt32.exe.
This article describes how to change the default directory that Microsoft Project 98 uses when you open and save files.
Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft Support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact the Microsoft fee-based consulting line at (800) 936-5200. For more information about the support options available from Microsoft, please see the following page on the World Wide Web:
http://www.microsoft.com/support/supportnet/refguide/default.asp
Use either of the following two methods to change the default directory
that Microsoft Project uses when you open and save files.
To create a macro and a shortcut that automatically changes the directory when Project is launched, follow these steps:
1. In a new project, point to Macro on the Tools menu, and then click
Macros.
2. In the Macro Name box, type "Auto_Open" (without the quotation marks).
3. In the Macros In list, click This Project.
4. Click Create.
5. Type the following in the new module:
Sub Auto_Open()
ChDrive "c:\"
ChDir "c:\Program Files"
FileNew
WindowActivate WindowName:="ProjChDr.mpp"
FileClose pjdonotsave
End Sub
NOTE: If you want to use a different disk drive, replace the "c:\"
drive in the line
ChDrive "c:\"
with a different drive.
If you want to use a different directory, replace "c:\Program Files"
in the line
ChDir "c:\Program Files"
with a different directory.
6. On the File menu, click Close and Return to Microsoft Project.
7. On the File menu, click Save As.
8. In the File Name box, type "ProjChDr" (without the quotation marks).
9. Navigate to the directory where Winproj.exe is located, and click Save
to save the file there.
By default, this is \Program Files\Microsoft Office\Office.
10. On the File menu, click Exit.
11. On the Start menu, point to Programs, and click Windows Explorer.
12. In the left pane of Windows Explorer, click the Desktop icon.
13. On the File menu, point to New, and then click Shortcut.
14. In the Create Shortcut dialog box, click Browse.
15. Browse to the location of Winproj.exe and click to select the
Winproj.exe icon. The default directory is:
C:\Program Files\Microsoft Office\Office
16. Click Open.
17. At the end of the Command Line, type a space after the quotation mark,
and then type "ProjChDr.mpp" (without the quotation marks).
For example the Command Line may read:
"C:\Program Files\Microsoft Office\Office\Winproj.exe" ProjChDr.mpp
18. Click Next.
19. Change the name of the shortcut to the name you want, and then click
Finish.
When you start Microsoft Project using the shortcut that you just created,
your new macro will run.
NOTE: When you open the project file, you will see a dialog box notifying you that it contains a macro. If you want to change the directory, you must click Enable Macro in this dialog box.
WARNING: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk.
For information about how to edit the registry, view the "Changing Keys And Values" Help topic in Registry Editor (Regedit.exe) or the "Add and Delete Information in the Registry" and "Edit Registry Data" Help topics in Regedt32.exe. Note that you should back up the registry before you edit it.
NOTE: The following steps change the default working directory in Microsoft Windows. Microsoft Access, Microsoft Excel, Microsoft Power Point, and Microsoft Word allow you to use default directories other than the Windows default directory.
To set the default working directory, follow these steps:
1. On the Windows Start menu, click Run.
2. In the Open box, type "regedit" (without the quotation marks). Click OK.
3. In the Registry Editor, select the following registry key:
HKEY_CURRENT_USER\Software\Microsoft\Windows\Current Version\
Explorer\ User Shell Folders
4. In the right pane, double-click Personal.
5. In the Value Data box, type the path you want to use for the default
working directory. For example, type "C:\My Documents" (without the
quotation marks).
6. Click OK.
7. On the Registry menu, click Exit.
Additional query words: folder
Keywords : kbprg kbdta kbdtacode kbfaq
Version : WINDOWS:98
Platform : WINDOWS
Hardware : x86
Issue type : kbhowto
Last Reviewed: May 17, 1999