ToolsAutoCorrect

Syntax

ToolsAutoCorrect [.InitialCaps = number] [, .SentenceCaps = number] [, .Days = number] [, .CapsLock = number] [, .ReplaceText = number] [, .Formatting = number] [, .Replace = text] [, .With = text] [, .Add] [, .Delete] [, .SmartQuotes = number]

Remarks

Sets AutoCorrect options. The arguments for the ToolsAutoCorrect statement correspond to the options in the AutoCorrect dialog box (Tools menu).

Argument

Explanation

.InitialCaps

If 1, Word corrects words in which the first two letters are capitalized. For example, "WOrd" becomes "Word."

.SentenceCaps

If 1, Word capitalizes the first letter of new sentences.

.Days

If 1, Word capitalizes the days of the week. For example, "tuesday" becomes "Tuesday."

.CapsLock

If 1, Word corrects typing with CAPS LOCK on.

.ReplaceText

If 1, activates automatic replacement of text.

.Formatting

If 1, formatting is stored with the replacement text when a replacement entry is added; available only if text is selected before running ToolsAutoCorrect.

.Replace

The text you want to replace automatically with the text specified by .With (for example, a person's initials).

.With

The text you want to insert automatically when the text specified by .Replace is typed (for example, a person's full name).

.Add

Adds the text specified by .Replace and .With to the list of replacement entries.

.Delete

Deletes the replacement entry specified by .Replace.

.SmartQuotes

If 1, Word inserts "smart" quotation marks (" " and ' ') and apostrophes (').


Example

This example adds a replacement entry and activates automatic replacement of text:


ToolsAutoCorrect .ReplaceText = 1, .Replace = "sr", \
        .With = "Stella Richards", .Add

See Also

ToolsAutoCorrectCapsLockOff, ToolsAutoCorrectDays, ToolsAutoCorrectInitialCaps, ToolsAutoCorrectReplaceText, ToolsAutoCorrectSentenceCaps, ToolsAutoCorrectSmartQuotes