Share via


IDM_ORDERLIST Command ID

Toggles the text selection between an ordered list and a normal format block.

C++ Information

Command group CGID_MSHTML (defined in mshtmhst.h)
Symbolic constant IDM_ORDERLIST
User interface None. Set nCmdExecOpt to OLECMDEXECOPT_DONTPROMPTUSER.
IOleCommandTarget::Exec parameters
pvaInVARIANT of type VT_BSTR that specifies an id attribute for the ordered list. May be set to NULL.
pvaOut Set to NULL.
Header file mshtmcid.h
Applies to IHTMLDocument2::execCommand, IHTMLDocument2::queryCommandEnabled, IHTMLDocument2::queryCommandIndeterm, IHTMLDocument2::queryCommandState, IHTMLDocument2::queryCommandSupported, IHTMLDocument2::queryCommandValue, IOleCommandTarget::Exec, IOleCommandTarget::QueryStatus.

Remarks

If the previous format block is already an ordered list, this command identifier will append the current format block to that previous ordered list. If the text selection contains named objects, they are replaced by the list.

The following example converts the paragraphs of a document into a list:

var tr = document.body.createTextRange();
tr.execCommand("InsertOrderedList", false, 'listId'); 

Minimum Availability

Internet Explorer 4.0 and later.

See Also

IHTMLTextAreaElement::createTextRange