DefaultDir$()

Syntax

DefaultDir$(Type)

Remarks

Returns the path currently set for the default folder specified by Type, a number that corresponds to a default folder, as shown in the following table.

Type

Explanation

0

DOC-PATH

1

PICTURE-PATH

2

USER-DOT-PATH

3

WORKGROUP-DOT-PATH

4

INI-PATH

5

AUTOSAVE-PATH

6

TOOLS-PATH

7

CBT-PATH

8

STARTUP-PATH

9

The program-file path (PROGRAMDIR)

10

The graphics-filter path (fixed; cannot be changed)

11

The text-converter path (fixed; cannot be changed)

12

The proofing-tool path (fixed; cannot be changed)

13

The temporary-file path

14

The current folder

15

The style-gallery–template path (can be changed using ChDefaultDir)

16

The Trash folder (Macintosh only)

17

The Microsoft folder (Macintosh only)


Example

This example sets TOOLS-PATH to C:\TOOLS if it is not set already. On the Macintosh, substitute a folder name such as HD:TOOLS.


If DefaultDir$(6) = "" Then
    ChDefaultDir "C:\TOOLS", 6
End If

See Also

ChDefaultDir, ChDir