execCommandexecCommand*
*Contents  *Index  *Topic Contents
*Previous Topic: empty
*Next Topic: execScript

execCommand

Description

Executes a command over the given selection or text range.

Syntax

Boolean = object.execCommand(sCommand [, bUserInterface [, vValue]])

ParameterDescription
sCommand String specifying the command to execute. Can be any valid command identifier.
bUserInterface Optional. Boolean value specifying whether to display a user interface if the command supports one. Can be TRUE or FALSE. If not given, defaults to FALSE.
vValue Optional. Variant specifying a string, number, or other value to assign. Possible values depend on command.

Return Value

Returns TRUE if the command is successful, or FALSE otherwise.

Remarks

Wait to invoke the execCommand method until after the page has loaded.

Applies To

document, TextRange

See Also

queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported, queryCommandValue


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.