WD98: Changing the Default Folder

ID: Q183996

The information in this article applies to:

SUMMARY

This article discusses methods you can use to change the default folder that appears when you click Open on the File menu.

MORE INFORMATION

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/ 

To change the default folder that is displayed when you click Open on the File menu, use either of the following methods.

NOTE: Word will select the folder based on settings found in the Documents section of the General Controls control panel. This control panel allows you to set one of the following options:

Method 1: To manually change the default folder

Use the following steps to manually change the default folder:

1. On the Tools menu, click Preferences.

2. Click the File Locations tab.

3. Under File Types, select Documents, and then click Modify.

4. Change to the desired location.

Method 2: Using a macro to change your default directory

NOTE: When you exit Word after you have modified or added these changes, you may be prompted to save the changes to the Normal template. Click Yes to save your changes.

Use the following example Visual Basic for Applications macro to change the default document folder:

   Sub SetDefaultFolder()
      ' Set the default folder.
      ' Note: Substitute any existing path and folder.
      Options.DefaultFilePath(Path:=wdDocumentsPath) = "Mac HD:My Docs:"
   End Sub

For additional information, please see the following articles in the Microsoft Knowledge Base:

   ARTICLE-ID: Q178062
   TITLE     : OFF98: Default Folder Not Selected When Saving or Opening
               File

   ARTICLE-ID: Q181058
   TITLE     : OFF98: How to Run Sample Code from Knowledge Base Articles

REFERENCES

For more information about getting help with Visual Basic for Applications, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q163435
   TITLE     : VBA: Programming Resources for Visual Basic for
               Applications

Additional query words: wordcon vb vba vbe grey gray unavailable set filespec filetype format
Keywords          : kbdtacode OffVBA kbmacroexample macword98 
Version           : MACINTOSH:98
Platform          : MACINTOSH
Hardware          : MAC
Issue type        : kbhowto

Last Reviewed: June 1, 1999