ToolsAdvancedSettings

Syntax

ToolsAdvancedSettings .Application = text, .Option = text , .Setting = text [, .Delete] [, .Set]

Remarks

Changes settings in a settings file, such as WINWORD6.INI (Windows 3.x) or Word Settings (6) (Macintosh), or a private settings file. The arguments for ToolsAdvancedSettings correspond to the options in the Advanced Settings dialog box, which you can display by choosing Macro from the Tools menu and running the Word command ToolsAdvancedSettings. Note that in Windows 95 and Windows NT, settings are stored in the registry and you cannot useToolsAdvancedSettings to change them.

Argument

Explanation

.Application

The name of a section in a settings file, as listed in the Categories box.

Note that by following the section name with a space and the name of a settings file in parentheses, you can set a key in any settings file. In Windows for example, "Macro Settings (MY.INI)" specifies the [Macro Settings] section of the MY.INI file in the Windows folder. On the Macintosh, "Macro Settings (MY SETTINGS)" specifies the [Macro Settings] section of the MY SETTINGS file in SYSTEM FOLDER:PREFERENCES.

.Option

The key to set.

.Setting

The new setting.

.Delete

Deletes the key.

.Set

Sets the key.


For more information about changing settings in a settings file, see SetPrivateProfileString.

Example

This example sets the date format in the [Microsoft Word] section of the Word settings file:


ToolsAdvancedSettings .Application = "Microsoft Word", \
        .Option = "DateFormat", .Setting = "M/D/YYYY", .Set

See Also

GetPrivateProfileString$(), GetProfileString$(), SetPrivateProfileString, SetProfileString, ToolsOptionsFileLocations