IHTMLDocument2::queryCommandValue Method
Returns the current value of the document, range, or current selection for the given command.
Syntax
HRESULT queryCommandValue( BSTR cmdID, VARIANT *pcmdValue );
Parameters
- cmdID
- [in] BSTR that specifies a command identifier.
- pcmdValue
- [out, retval] Pointer to a VARIANT that returns the command value for the document, range, or current selection, if supported. Possible values and possible VARIANT subtypes depend on cmdID. If not supported, this method returns a VARIANT of type VT_BOOL set to FALSE.
Return Value
Returns S_OK if successful, or an error value otherwise.
Remarks
This method is a wrapper function for the IOleCommandTarget::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.
See Also