WD97: Changing the Default File Name and DirectoryLast reviewed: February 4, 1998Article ID: Q158348 |
The information in this article applies to:
SUMMARYIn Microsoft Word, you can change the default directory and default file names that appear when you click Open on the File menu.
MORE INFORMATIONMicrosoft provides examples of Visual Basic for Applications procedures 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. The Visual Basic procedures in this article are provided 'as is' and Microsoft does not guarantee that they can be used in all situations. While Microsoft support engineers can help explain the functionality of a particular macro, they will not modify these examples to provide added functionality, nor will they help you construct macros to meet your specific needs. If you have limited programming experience, you may want to consult one of the Microsoft Solution Providers. Solution Providers offer a wide range of fee-based services, including creating custom macros. For more information about Microsoft Solution Providers, call Microsoft Customer Information Service at (800) 426-9400.
Displaying All or a Specific type of Files in a DirectoryTo modify the FileOpen macro so that it will list all the files in a specific directory, do the following:
Changing the Default Word Extension:WARNING: ANY USE BY YOU OF THE PROCEDURE PROVIDED IN THIS ARTICLE IS AT YOUR OWN RISK. The use of the provided procedure may cause unexpected results on some systems. Microsoft provides this procedure "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. Use the following procedure to change the default file extension that appears when you click Open or Save on the File menu.
Changing the Default DirectoryTo change the default directory that will display when you click Open on the File menu, use either of the following methods. Method 1: Use the following steps to manually change the default directory:
a. On the Tools menu, click Options. b. Select the File Locations tab. c. Under "File Types," select Documents, and then click Modify. d. Change to the desired location.Method 2: Add an Application.ChangeFileOpenDirectory statement to your FileOpen macro. Refer to the previous macro example, the directory specified in the Application.ChangeFileOpenDirectory line must be a valid directory on your system. NOTE: When you exit Word for Windows after you have modified or added these changes, you may be prompted to save the changes to the Normal template. Choose Yes to save your changes. |
Additional query words: grey gray unavailable set filespec filetype
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |