返回或设置各项(例如文档、模板和图形)的默认文件夹。String 类型,可读写。
expression.DefaultFilePath(Path)
expression 必需。返回 Options 对象的表达式。
Path WdDefaultFilePath,必需。设置默认的文件夹。
WdDefaultFilePath 可以是下列 WdDefaultFilePath 常量之一: |
wdAutoRecoverPath |
wdCurrentFolderPath |
wdGraphicsFiltersPath |
wdProgramPath |
wdStartupPath |
wdTempFilePath |
wdToolsPath |
wdUserOptionsPath |
wdWorkgroupTemplatesPath |
wdBorderArtPath |
wdDocumentsPath |
wdPicturesPath |
wdProofingToolsPath |
wdStyleGalleryPath |
wdTextConvertersPath |
wdTutorialPath |
wdUserTemplatesPath |
新的设置立即生效。
您可以使用空字符串 ("") 从 Windows 注册表中删除设置。
本示例为 Word 文档设置默认文件夹。
Options.DefaultFilePath(wdDocumentsPath) = "C:\Documents"
本示例返回用户模板当前的默认路径(相当于“选项”对话框中的“文件位置”选项卡设置的默认路径)。
Dim strPath As String
strPath = Options.DefaultFilePath(wdUserTemplatesPath)