queryCommandEnabledqueryCommandEnabled*
*Contents  *Index  *Topic Contents
*Previous Topic: prompt
*Next Topic: queryCommandIndeterm

queryCommandEnabled

Description

Returns whether the command can be successfully executed using ExecCommand now, given the current state of the document.

Syntax

Boolean = object.queryCommandEnabled(command)

ParameterDescription
command (String) String that specifies the command to query. Can be any valid command identifier.

Return Value

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

Remarks

Note: queryCommandEnabled("delete") on TextRange returns TRUE, while queryCommandEanbled("delete") on Document returns FALSE, but you can still use execCommand("Delete") to delete the selected text.

Applies To

document, TextRange

See Also

execCommand, queryCommandIndeterm, queryCommandState, queryCommandSupported, queryCommandValue


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