DefaultFilePath Property

Applies To

Options object.

Description

Returns or sets default folders for items such as documents, templates, and graphics. Read/write String.

Syntax

expression.DefaultFilePath(Path)

expression Required. An expression that returns an Options object.

Path Required Long. The default folder to set. Can be one of the following WdDefaultFilePath constants:

  • wdAutoRecoverPath
  • wdBorderArtPath
  • wdCurrentFolderPath
  • wdDocumentsPath
  • wdGraphicsFiltersPath
  • wdPicturesPath
  • wdProgramPath
  • wdProofingToolsPath
  • wdStartupPath
  • wdStyleGalleryPath
  • wdTempFilePath
  • wdTextConvertersPath
  • wdToolsPath
  • wdTutorialPath
  • wdUserOptionsPath
  • wdUserTemplatesPath
  • wdWorkgroupTemplatesPath

Remarks

The new setting takes effect immediately.

You can use an empty string ("") to remove the setting from the registry (Windows 95 and Windows NT) or Word Settings (8) (Macintosh).

See Also

ChangeFileOpenDirectory method, StartupPath property.

Example

This example sets the default folder for Word documents.

Options.DefaultFilePath(wdDocumentsPath) = "C:\My Documents"
This example returns the current default path for user templates (corresponds to the default path setting on the File Locations tab in the Options dialog box).

temp = Options.DefaultFilePath(wdUserTemplatesPath)