Overtype, Overtype()

Syntax

Overtype [On]

Overtype()

Remarks

The Overtype statement switches between overtype and insert modes. In overtype mode, characters you type replace existing characters one by one; in insert mode, characters you type move existing text to the right.

Argument

Explanation

On

Specifies the mode:

0 (zero) Switches to insert mode.

1 Switches to overtype mode ("OVR" appears in status bar).

Omitted Switches between overtype and insert modes.


The Overtype() function returns the following values.

Value

Explanation

0 (zero)

If overtype mode is off

–1

If overtype mode is on


Note that text you insert with the Insert statement will not overwrite text in the document, regardless of whether the document is in insert or overtype mode.

Example

If overtype mode is active, this example displays a message box with Yes and No buttons asking if overtype should be deactivated. If the user chooses Yes, which returns a value of –1, overtype is deactivated.


If Overtype() = -1 Then 
    Button = MsgBox("Overtype is on. Turn off?", 4) 
    If button = -1 Then Overtype 0
End If

See Also

ToolsOptionsGeneral