Commands S-Z (C++)

Command identifiers S-Z for C++.

IDM_SAVEAS

Saves the current webpage to a file.

Command groupCGID_MSHTML (defined in mshtmhst.h)
Symbolic constantIDM_SAVEAS
Header filemshtmcid.h

 

Call IOleCommandTarget::Exec with the following parameters.

nCmdExecOpt

This command displays a dialogue box if nCmdExecOpt is set to MSOCMDEXECOPT_DODEFAULT, MSOCMDEXECOPT_PROMPTUSER, or NULL. It does not display a dialogue box if the argument is set to MSOCMDEXECOPT_DONTPROMPTUSER.This parameter is ignored. The Save HTML Document dialog box is always displayed.

pvaIn

VARIANT of type VT_BSTR that specifies the path and file name of the file to which to save the Web page. When the path contains more than one folder name, separate the folder names with two backward slashes (\\).

pvaOut

Set to NULL.

The Save HTML Document dialog cannot be suppressed when calling this method from script.

Windows Internet Explorer 7 and later. The file path portion of pvaIn parameter is ignored.

IDM_SELECTALL

Selects the entire document.

Command groupCGID_MSHTML (defined in mshtmhst.h)
Symbolic constantIDM_SELECTALL
Header filemshtmcid.h

 

Call IOleCommandTarget::Exec with the following parameters.

nCmdExecOpt

Set to OLECMDEXECOPT_DONTPROMPTUSER.

pvaIn

Set to NULL.

pvaOut

Set to NULL.

IDM_SIZETOCONTROL

Not supported.

Command groupCGID_MSHTML (defined in mshtmhst.h)
Symbolic constantIDM_SIZETOCONTROL
Header filemshtmcid.h

 

IDM_SIZETOCONTROLHEIGHT

Not supported.

Command groupCGID_MSHTML (defined in mshtmhst.h)
Symbolic constantIDM_SIZETOCONTROLHEIGHT
Header filemshtmcid.h

 

IDM_SIZETOCONTROLWIDTH

Not supported.

Command groupCGID_MSHTML (defined in mshtmhst.h)
Symbolic constantIDM_SIZETOCONTROLWIDTH
Header filemshtmcid.h

 

IDM_STARTDIAGNOSTICMODE

Overwrites a horizontal line on the text selection.

Command groupCGID_MSHTML (defined in mshtmhst.h)
Symbolic constantIDM_STARTDIAGNOSTICMODE
Header filemshtmcid.h

 

Call IOleCommandTarget::Exec with the following parameters.

nCmdExecOpt

Set to OLECMDEXECOPT_DONTPROMPTUSER.

pvaIn

VARIANT which contains a SAFEARRAY containing BSTRs discussed in the comment below.

pvaOut

NULL

Remarks

With Internet Explorer 11, tools can instantiate objects within a page they wish to target for the purpose of diagnosing. There are two different approaches, depending on whether tool is starting a new IE instance or attaching to a running one.

  • By a tool that is launching IE or a WWA for the purpose of debugging. In this scenario the variables should be set as part of the creation process as per-process environment variables. They should not be set as machine or user wide variables.
  • By a tool that is attaching to a running instance of IE or a WWA for the purpose of debugging. In this scenario the variables should use the IDM_STARTDIAGNOSTICSMODE OLE command target.
Environment VariableDescription

JS_DM_CLSID

The CLSID of the object to be co-created by IE. The object must implement IObjectWithSetSite.

Example: {832ae882-2b23-4e55-b8fc-8f88898f97f8}

JS_DM_PATH

Optional path to the server object binary.

Example: C:\MyBinary.dll

 

All values should be set as strings not exceeding MAX_PATH in length. This feature can be disabled by the registry setting detailed below:

Key Name

\Software\Microsoft\Internet Explorer\ Main!DisableDiagnosticsMode

Type

REG_SZ

Values

Yes – This feature is disabled No – This feature is enabled (default)

 

IDM_STOP

Not supported.

Command groupCGID_MSHTML (defined in mshtmhst.h)
Symbolic constantIDM_STOP
Header filemshtmcid.h

 

IDM_STRIKETHROUGH

Not supported.

Command groupCGID_MSHTML (defined in mshtmhst.h)
Symbolic constantIDM_STRIKETHROUGH
Header filemshtmcid.h

 

IDM_SUBSCRIPT

Not supported.

Command groupCGID_MSHTML (defined in mshtmhst.h)
Symbolic constantIDM_SUBSCRIPT
Header filemshtmcid.h

 

IDM_SUPERSCRIPT

Not supported.

Command groupCGID_MSHTML (defined in mshtmhst.h)
Symbolic constantIDM_SUPERSCRIPT
Header filemshtmcid.h

 

IDM_TEXTAREA

Overwrites a multiline text input control on the text selection.

Command groupCGID_MSHTML (defined in mshtmhst.h)
Symbolic constantIDM_TEXTAREA
Header filemshtmcid.h

 

Call IOleCommandTarget::Exec with the following parameters.

nCmdExecOpt

Set to OLECMDEXECOPT_DONTPROMPTUSER.

pvaIn

VARIANT of type VT_BSTR that specifies an id attribute for the text input control. May be set to NULL or omitted.

pvaOut

Set to NULL.

IDM_TEXTBOX

Overwrites a text control on the text selection.

Command groupCGID_MSHTML (defined in mshtmhst.h)
Symbolic constantIDM_TEXTBOX
Header filemshtmcid.h

 

Call IOleCommandTarget::Exec with the following parameters.

nCmdExecOpt

Set to OLECMDEXECOPT_DONTPROMPTUSER.

pvaIn

VARIANT of type VT_BSTR that specifies an id attribute for the text control. May be set to NULL or omitted.

pvaOut

Set to NULL.

IDM_UNBOOKMARK

Removes any bookmark from the current selection.

Command groupCGID_MSHTML (defined in mshtmhst.h)
Symbolic constantIDM_UNBOOKMARK
Header filemshtmcid.h

 

Call IOleCommandTarget::Exec with the following parameters.

nCmdExecOpt

Set to OLECMDEXECOPT_DONTPROMPTUSER.

pvaIn

Set to NULL.

pvaOut

Set to NULL.

IDM_UNDERLINE

Toggles the current selection between underlined and not underlined.

Command groupCGID_MSHTML (defined in mshtmhst.h)
Symbolic constantIDM_UNDERLINE
Header filemshtmcid.h

 

Call IOleCommandTarget::Exec with the following parameters.

nCmdExecOpt

Set to OLECMDEXECOPT_DONTPROMPTUSER.

pvaIn

Set to NULL.

pvaOut

Set to NULL.

IDM_UNDO

Undo the previous command.

Command groupCGID_MSHTML (defined in mshtmhst.h)
Symbolic constantIDM_UNDO
Header filemshtmcid.h

 

Call IOleCommandTarget::Exec with the following parameters.

nCmdExecOpt

Set to OLECMDEXECOPT_DONTPROMPTUSER.

pvaIn

Set to NULL.

pvaOut

Set to NULL.

This command applies to the document object. For example, the following button reverses the last action.


<button onclick="document.execCommand('Undo')">UNDO</button> 

IDM_UNLINK

Removes any hyperlink from the current selection.

Command groupCGID_MSHTML (defined in mshtmhst.h)
Symbolic constantIDM_UNLINK
Header filemshtmcid.h

 

Call IOleCommandTarget::Exec with the following parameters.

nCmdExecOpt

Set to OLECMDEXECOPT_DONTPROMPTUSER.

pvaIn

Set to NULL.

pvaOut

Set to NULL.

IDM_UNORDERLIST

Converts the text selection into an ordered list.

Command groupCGID_MSHTML (defined in mshtmhst.h)
Symbolic constantIDM_UNORDERLIST
Header filemshtmcid.h

 

Call IOleCommandTarget::Exec with the following parameters.

nCmdExecOpt

Set to OLECMDEXECOPT_DONTPROMPTUSER.

pvaIn

VARIANT of type VT_BSTR that specifies an id attribute for the unordered list. May be set to NULL or omitted.

pvaOut

Set to NULL.

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("InsertUnorderedList", false, 'listId'); 

 

 

Show: