Share via


OlkTextBox.KeyPress Event (Outlook)

Occurs when the user presses an ANSI key.

Version Information

Version Added: Outlook 2007

Syntax

expression .KeyPress(KeyAscii)

expression A variable that represents an OlkTextBox object.

Parameters

Name

Required/Optional

Data Type

Description

KeyAscii

Required

Long

The numerical value of the key pressed.

Remarks

An ANSI key is one that produces a typeable character when the user presses it. The KeyPress event occurs when the user presses an ANSI key on a running form while the form or a control on it has the focus. The event can occur either before or after the key is released.

A KeyPress event does not occur under the following conditions:

  • Pressing TAB

  • Pressing ENTER

  • Pressing an arrow key

  • When a keystroke causes the focus to move from one control to another.

See Also

Concepts

OlkTextBox Object Members

OlkTextBox Object