MSHTML Command Identifiers

This section contains a set of MSHTML command identifiers that specify an action to take on the given object. They can be used with the IOleCommandTarget::Exec and IOleCommandTarget::QueryStatus methods.

Command Identifiers

IDM_1D_ELEMENT

Determines if an element is statically positioned.

IDM_2D_ELEMENT

Determines if an element is absolutely positioned.

IDM_2D_POSITION

Allows absolutely positioned elements to be moved by dragging.

IDM_ABSOLUTE_POSITION

Sets an element's position property to "absolute."

IDM_ADDFAVORITES

Prompts the user with a dialog box to add the current document, a hyperlink, or an image to the Favorites list.

IDM_ADDTOGLYPHTABLE

Adds an entry or entries to the glyph table, which specifies images to display for specific tags in design mode.

IDM_ATOMICSELECTION

When this command is issued in design mode, any element that has an ATOMICSELECTION attribute set to TRUE will be selectable only as a unit.

IDM_AUTOURLDETECT_MODE

Turns automatic URL detection on and off.

IDM_BACKCOLOR

Sets or retrieves the background color of the current selection.

IDM_BASELINEFONT1

Selects largest font size.

IDM_BASELINEFONT2

Selects large font size.

IDM_BASELINEFONT3

Selects medium font size.

IDM_BASELINEFONT4

Selects small font size.

IDM_BASELINEFONT5

Selects smallest font size.

IDM_BEGINUSERACTION

Command explicitly instructs MSHTML to begin an action.

IDM_BLOCKDIRLTR

Not supported.

IDM_BLOCKDIRRTL

Not supported.

IDM_BLOCKFMT

Sets or retrieves the current block format tag.

IDM_BOLD

Toggles the current selection between bold and nonbold.

IDM_BOOKMARK

Creates a bookmark anchor or retrieves the name of a bookmark anchor for the current selection or insertion point.

IDM_BREAKATNEXT

Break script execution in debugger at next line.

IDM_BROWSEMODE

Not supported.

IDM_BUTTON

Overwrites a button control on the text selection.

IDM_CARETBROWSINGMODE

Sets the state of caret browsing mode, which allows movement within a page and navigation using a keyboard.

IDM_CHECKBOX

Overwrites a check box control on the text selection.

IDM_CLEARAUTHENTICATIONCACHE

Clears all authentication credentials from the cache. Applies only to IHTMLDocument2::execCommand.

IDM_CLEARSELECTION

Clears the current selection.

IDM_COMPOSESETTINGS

Sets the default composition font settings for the MSHTML Editor.

IDM_COPY

Copies the current selection to the clipboard.

IDM_COPYFORMAT

Not implemented.

IDM_CUT

Copies the current selection to the clipboard and then deletes it.

IDM_DEFAULTBLOCK

Set or retrieves the default block element.

IDM_DELETE

Deletes the current selection.

IDM_DIRLTR

Not supported.

IDM_DIRRTL

Not supported.

IDM_DROPDOWNBOX

Overwrites a drop-down selection control on the text selection.

IDM_DYNSRCPLAY

Not supported.

IDM_DYNSRCSTOP

Not supported.

IDM_EDITMODE

Not supported.

IDM_EDITSOURCE

Displays the source editor.

IDM_ENDUSERACTION

Command explicitly instructs MSHTML to end an action.

IDM_EXECPRINT

Not supported.

IDM_FIND

Shows the Find dialog.

IDM_FOLLOWLINKC

Opens selected link in current window.

IDM_FOLLOWLINKN

Opens selected link in a new window.

IDM_FOLLOWLINKT

Opens selected link in a new tab.

IDM_FONT

Opens a font dialog box to enable the user to change the text color, font, and font size of the current selection.

IDM_FONTNAME

Sets or retrieves the font for the current selection.

IDM_FONTSIZE

Sets or retrieves the font size for the current selection.

IDM_FORECOLOR

Sets or retrieves the foreground (text) color of the current selection.

IDM_FORMATMARK

Shows or hides formatting indicators.

IDM_GETBLOCKFMTS

Retrieves the strings corresponding to the available block format tags.

IDM_GETBYTESDOWNLOADED

Retrieves the progress of the download.

IDM_GETFRAMEZONE

IDM_GETFRAMEZONE returns the security zone of the current page in the browser.

IDM_GETPRINTTEMPLATE

Retrieves whether the document is a print template.

IDM_GETUSERACTIONTIME

Retrieves the last user action time.

IDM_GOBACKWARD

Go to the previous URL entry in the history list.

IDM_GOFORWARD

Go to the next URL entry in the history list.

IDM_HORIZONTALLINE

Overwrites a horizontal line on the text selection.

IDM_HTMLEDITMODE

Enables the IDM_COMPOSESETTINGS command.

IDM_HYPERLINK

Inserts a hyperlink on the current selection, or displays a dialog box enabling the user to specify a URL to insert as a hyperlink on the current selection.

IDM_IFRAME

Overwrites an inline frame on the text selection.

IDM_IMAGE

Overwrites an image on the text selection.

IDM_IME_ENABLE_RECONVERSION

Sets whether to enable Input Method Editor (IME) reconversion.

IDM_INDENT

Increases the indent of the selected text by one indentation increment.

IDM_INLINEDIRLTR

Not supported.

IDM_INLINEDIRRTL

Not supported.

IDM_INSERTOBJECT

Inserts a Microsoft ActiveX control.

IDM_INSFIELDSET

Overwrites a box on the text selection.

IDM_INSINPUTBUTTON

Overwrites a button control on the text selection.

IDM_INSINPUTHIDDEN

Inserts a hidden control on the text selection.

IDM_INSINPUTIMAGE

Overwrites an image control on the text selection.

IDM_INSINPUTPASSWORD

Overwrites a password control on the text selection.

IDM_INSINPUTRESET

Overwrites a reset control on the text selection.

IDM_INSINPUTSUBMIT

Overwrites a submit control on the text selection.

IDM_INSINPUTUPLOAD

Overwrites a file upload control on the text selection.

IDM_ITALIC

Toggles the current selection between italic and nonitalic.

IDM_JUSTIFYCENTER

Centers the format block in which the current selection is located.

IDM_JUSTIFYFULL

Not supported.

IDM_JUSTIFYLEFT

Left-justifies the format block in which the current selection is located.

IDM_JUSTIFYNONE

Not supported.

IDM_JUSTIFYRIGHT

Right-justifies the format block in which the current selection is located.

IDM_KEEPSELECTION

Maintains a selection in a browser instance when the browser loses focus.

IDM_LAUNCHDEBUGGER

View source in the script debugger.

IDM_LISTBOX

Overwrites a list box selection control on the text selection.

IDM_LIVERESIZE

Causes the MSHTML Editor to update an element's appearance continuously during a resizing or moving operation, rather than updating only at the completion of the move or resize.

IDM_MARQUEE

Overwrites an empty marquee on the text selection.

IDM_MULTIPLESELECTION

Allows for the selection of more than one site selectable element at a time when the user holds down the SHIFT or CTRL keys.

IDM_NEW

Shows the "New HTML Document" dialog.

IDM_OPEN

Not supported.

IDM_OPTIONS

Show the Internet Options dialog.

IDM_ORDERLIST

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

IDM_OUTDENT

Decreases by one increment the indentation of the format block in which the current selection is located.

IDM_OVERWRITE

Toggles the text-entry mode between insert and overwrite.

IDM_PARAGRAPH

Overwrites a line break on the text selection.

IDM_PARSECOMPLETE

Notifies the host that the document is ready to be modified.

IDM_PASTE

Overwrites the contents of the clipboard on the current selection.

IDM_PASTEFORMAT

Not implemented.

IDM_PASTEINSERT

Inserts the contents of the clipboard.

IDM_PASTESPECIAL

Pastes the contents of the clipboard (along with formatting) over the current selection.

IDM_PRINT

Prints the current document using either the default print template or a custom print template.

IDM_PRINTPREVIEW

Opens the Print Preview window for the current document using either the default print preview template or a custom template.

IDM_PROPERTIES

Shows the Properties dialog box for the current element or document.

IDM_RADIOBUTTON

Overwrites a radio control on the text selection.

IDM_REDO

Not supported.

IDM_REFRESH

Refreshes the current document.

IDM_REMOVEFORMAT

Removes the formatting tags from the current selection.

IDM_REMOVEFROMGLYPHTABLE

Deletes an entry or entries from the glyph table.

IDM_REMOVEPARAFORMAT

Not supported.

IDM_REPLACE

Shows the Search and Replace dialog.

IDM_RUNURLSCRIPT

Executes the specified script.

IDM_SAVE

Shows the File Save dialog.

IDM_SAVEAS

Saves the current webpage to a file.

IDM_SELECTALL

Selects the entire document.

IDM_SETCUSTOMCURSOR

Sets the custom cursor.

IDM_SETDIRTY

Sets whether the document has been modified.

IDM_SETPRINTTEMPLATE

Sets whether the document is a print template.

IDM_SHOWHIDE_CODE

Toggles the display of code.

IDM_SIZETOCONTROL

Not supported.

IDM_SIZETOCONTROLHEIGHT

Not supported.

IDM_SIZETOCONTROLWIDTH

Not supported.

IDM_STATUSBAR

Toggles the visibility of the status bar.

IDM_STOP

Not supported.

IDM_STRIKETHROUGH

Not supported.

IDM_SUBSCRIPT

Not supported.

IDM_SUPERSCRIPT

Not supported.

IDM_TABLE

Not implemented.

IDM_TEMPLATE_PAGESETUP

Passes the print settings of the Page Setup dialog box.

IDM_TEXTAREA

Overwrites a multiline text input control on the text selection.

IDM_TEXTBOX

Overwrites a text control on the text selection.

IDM_TOOLBARS

Toggles the visibility of the toolbar.

IDM_UNBOOKMARK

Removes any bookmark from the current selection.

IDM_UNDERLINE

Toggles the current selection between underlined and not underlined.

IDM_UNDO

Undo the previous command.

IDM_UNLINK

Removes any hyperlink from the current selection.

IDM_UNORDERLIST

Converts the text selection into an ordered list.

IDM_VIEWSOURCE

Launches the configured HTML source viewer.

IECMDID_BEFORENAVIGATE_DOEXTERNALBROWSE

Starts navigation in a new window.

IECMDID_BEFORENAVIGATE_GETIDLIST

Retrieves a buffer that contains the item identifier list.

IECMDID_BEFORENAVIGATE_GETSHELLBROWSE

Retrieves whether the pending navigation is to a shell folder.

IECMDID_CLEAR_AUTOCOMPLETE_FOR_FORMS

Clears data saved in forms.

IECMDID_GET_INVOKE_DEFAULT_BROWSER_ON_NEW_WINDOW

Gets whether new windows launched from Web browser controls should launch the user's default browser. When set to false, new windows will be handled by Windows Internet Explorer, regardless of the user's default browser.

IECMDID_SET_INVOKE_DEFAULT_BROWSER_ON_NEW_WINDOW

Sets whether new windows launched from Web browser controls should launch the user's default browser. When set to false, new windows will be handled by Internet Explorer, regardless of the user's default browser.

IECMDID_SETID_AUTOCOMPLETE_FOR_FORMS

Sets the user ID of the autocompletion data store.