execCommand Method

MS Office DHTML, HTML & CSS

 
Click to return to the DHTML, HTML & CSS home page    
empty Method     execScript Method     DHTML Methods    

execCommand Method


Executes a command over the given selection or text range.

Syntax

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

Parameters

sCommandRequired. String that specifies the command to execute, which can be any valid command identifier.
bUserInterfaceOptional. Boolean that specifies one of the following values:
falseDefault. Does not display a user interface.
trueDisplays a user interface, if the command supports one.
vValueOptional. Variant that specifies the string, number, or other value to assign. Possible values depend on sCommand.

Return Value

Boolean. Returns true if the command is successful, or false otherwise.

Remarks

Do not invoke the execCommand method until after the page loads.

Applies To

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
Version data is listed when the mouse hovers over a link, or the link has focus.
document, controlRange, TextRange

See Also

queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported, queryCommandValue


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? write us!Internet Link

© 1999 microsoft corporation. all rights reserved. terms of useInternet Link.