5 out of 5 rated this helpful - Rate this topic

queryCommandValue method

Returns the current value of the document, range, or current selection for the given command.

Syntax

object.queryCommandValue(cmdID)

Standards information

There are no standards that apply here.

Parameters

cmdID [in]

Type: String

String that specifies a command identifier.

Return value

Type: Variant

Variant that returns the command value for the document, range, or current selection, if supported. Possible values depend on cmdID. If not supported, this method returns a Variant of type Boolean set to false.

Remarks

This method is a wrapper function for the QueryStatus method to enable scriptable execution of some command constants. You can obtain an IOleCommandTarget interface by calling QueryInterface on the IHTMLDocument2 interface using IID_IHTMLDocument2 for the IID.

This method is a wrapper function for the QueryStatus method to enable scriptable execution of some command constants. You can obtain an IOleCommandTarget interface by calling QueryInterface on the IHTMLControlRange interface using IID_IHTMLControlRange for the IID.

This method is a wrapper function for the QueryStatus method to enable scriptable execution of some command constants. You can obtain an IOleCommandTarget interface by calling QueryInterface on the IHTMLTxtRange interface using IID_IHTMLTxtRange for the IID.

See also

document
controlRange
TextRange
Reference
execCommand
queryCommandEnabled
queryCommandIndeterm
queryCommandState
queryCommandSupported

 

 

Send comments about this topic to Microsoft

Build date: 11/8/2012

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.