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_ELEMENTDetermines if an element is statically positioned.
IDM_2D_ELEMENTDetermines if an element is absolutely positioned.
IDM_2D_POSITIONAllows absolutely positioned elements to be moved by dragging.
IDM_ABSOLUTE_POSITIONSets an element's position property to "absolute."
IDM_ADDFAVORITESPrompts the user with a dialog box to add the current document, a hyperlink, or an image to the Favorites list.
IDM_ADDTOGLYPHTABLEAdds an entry or entries to the glyph table, which specifies images to display for specific tags in design mode.
IDM_ATOMICSELECTIONWhen 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_MODETurns automatic URL detection on and off.
IDM_BACKCOLORSets or retrieves the background color of the current selection.
IDM_BASELINEFONT1Selects largest font size.
IDM_BASELINEFONT2Selects large font size.
IDM_BASELINEFONT3Selects medium font size.
IDM_BASELINEFONT4Selects small font size.
IDM_BASELINEFONT5Selects smallest font size.
IDM_BEGINUSERACTIONCommand explicitly instructs MSHTML to begin an action.
IDM_BLOCKDIRLTRNot supported.
IDM_BLOCKDIRRTLNot supported.
IDM_BLOCKFMTSets or retrieves the current block format tag.
IDM_BOLDToggles the current selection between bold and nonbold.
IDM_BOOKMARKCreates a bookmark anchor or retrieves the name of a bookmark anchor for the current selection or insertion point.
IDM_BREAKATNEXTBreak script execution in debugger at next line.
IDM_BROWSEMODENot supported.
IDM_BUTTONOverwrites a button control on the text selection.
IDM_CARETBROWSINGMODESets the state of caret browsing mode, which allows movement within a page and navigation using a keyboard.
IDM_CHECKBOXOverwrites a check box control on the text selection.
IDM_CLEARAUTHENTICATIONCACHEClears all authentication credentials from the cache. Applies only to IHTMLDocument2::execCommand.
IDM_CLEARSELECTIONClears the current selection.
IDM_COMPOSESETTINGSSets the default composition font settings for the MSHTML Editor.
IDM_COPYCopies the current selection to the clipboard.
IDM_COPYFORMATNot implemented.
IDM_CUTCopies the current selection to the clipboard and then deletes it.
IDM_DEFAULTBLOCKSet or retrieves the default block element.
IDM_DELETEDeletes the current selection.
IDM_DIRLTRNot supported.
IDM_DIRRTLNot supported.
IDM_DROPDOWNBOXOverwrites a drop-down selection control on the text selection.
IDM_DYNSRCPLAYNot supported.
IDM_DYNSRCSTOPNot supported.
IDM_EDITMODENot supported.
IDM_EDITSOURCEDisplays the source editor.
IDM_ENDUSERACTIONCommand explicitly instructs MSHTML to end an action.
IDM_EXECPRINTNot supported.
IDM_FINDShows the Find dialog.
IDM_FOLLOWLINKCOpens selected link in current window.
IDM_FOLLOWLINKNOpens selected link in a new window.
IDM_FOLLOWLINKTOpens selected link in a new tab.
IDM_FONTOpens a font dialog box to enable the user to change the text color, font, and font size of the current selection.
IDM_FONTNAMESets or retrieves the font for the current selection.
IDM_FONTSIZESets or retrieves the font size for the current selection.
IDM_FORECOLORSets or retrieves the foreground (text) color of the current selection.
IDM_FORMATMARKShows or hides formatting indicators.
IDM_GETBLOCKFMTSRetrieves the strings corresponding to the available block format tags.
IDM_GETBYTESDOWNLOADEDRetrieves the progress of the download.
IDM_GETFRAMEZONEIDM_GETFRAMEZONE returns the security zone of the current page in the browser.
IDM_GETPRINTTEMPLATERetrieves whether the document is a print template.
IDM_GETUSERACTIONTIMERetrieves the last user action time.
IDM_GOBACKWARDGo to the previous URL entry in the history list.
IDM_GOFORWARDGo to the next URL entry in the history list.
IDM_HORIZONTALLINEOverwrites a horizontal line on the text selection.
IDM_HTMLEDITMODEEnables the IDM_COMPOSESETTINGS command.
IDM_HYPERLINKInserts 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_IFRAMEOverwrites an inline frame on the text selection.
IDM_IMAGEOverwrites an image on the text selection.
IDM_IME_ENABLE_RECONVERSIONSets whether to enable Input Method Editor (IME) reconversion.
IDM_INDENTIncreases the indent of the selected text by one indentation increment.
IDM_INLINEDIRLTRNot supported.
IDM_INLINEDIRRTLNot supported.
IDM_INSERTOBJECTInserts a Microsoft ActiveX control.
IDM_INSFIELDSETOverwrites a box on the text selection.
IDM_INSINPUTBUTTONOverwrites a button control on the text selection.
IDM_INSINPUTHIDDENInserts a hidden control on the text selection.
IDM_INSINPUTIMAGEOverwrites an image control on the text selection.
IDM_INSINPUTPASSWORDOverwrites a password control on the text selection.
IDM_INSINPUTRESETOverwrites a reset control on the text selection.
IDM_INSINPUTSUBMITOverwrites a submit control on the text selection.
IDM_INSINPUTUPLOADOverwrites a file upload control on the text selection.
IDM_ITALICToggles the current selection between italic and nonitalic.
IDM_JUSTIFYCENTERCenters the format block in which the current selection is located.
IDM_JUSTIFYFULLNot supported.
IDM_JUSTIFYLEFTLeft-justifies the format block in which the current selection is located.
IDM_JUSTIFYNONENot supported.
IDM_JUSTIFYRIGHTRight-justifies the format block in which the current selection is located.
IDM_KEEPSELECTIONMaintains a selection in a browser instance when the browser loses focus.
IDM_LAUNCHDEBUGGERView source in the script debugger.
IDM_LISTBOXOverwrites a list box selection control on the text selection.
IDM_LIVERESIZECauses 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_MARQUEEOverwrites an empty marquee on the text selection.
IDM_MULTIPLESELECTIONAllows for the selection of more than one site selectable element at a time when the user holds down the SHIFT or CTRL keys.
IDM_NEWShows the "New HTML Document" dialog.
IDM_OPENNot supported.
IDM_OPTIONSShow the Internet Options dialog.
IDM_ORDERLISTToggles the text selection between an ordered list and a normal format block.
IDM_OUTDENTDecreases by one increment the indentation of the format block in which the current selection is located.
IDM_OVERWRITEToggles the text-entry mode between insert and overwrite.
IDM_PARAGRAPHOverwrites a line break on the text selection.
IDM_PARSECOMPLETENotifies the host that the document is ready to be modified.
IDM_PASTEOverwrites the contents of the clipboard on the current selection.
IDM_PASTEFORMATNot implemented.
IDM_PASTEINSERTInserts the contents of the clipboard.
IDM_PASTESPECIALPastes the contents of the clipboard (along with formatting) over the current selection.
IDM_PRINTPrints the current document using either the default print template or a custom print template.
IDM_PRINTPREVIEWOpens the Print Preview window for the current document using either the default print preview template or a custom template.
IDM_PROPERTIESShows the Properties dialog box for the current element or document.
IDM_RADIOBUTTONOverwrites a radio control on the text selection.
IDM_REDONot supported.
IDM_REFRESHRefreshes the current document.
IDM_REMOVEFORMATRemoves the formatting tags from the current selection.
IDM_REMOVEFROMGLYPHTABLEDeletes an entry or entries from the glyph table.
IDM_REMOVEPARAFORMATNot supported.
IDM_REPLACEShows the Search and Replace dialog.
IDM_RUNURLSCRIPTExecutes the specified script.
IDM_SAVEShows the File Save dialog.
IDM_SAVEAS
Saves the current webpage to a file.
IDM_SELECTALLSelects the entire document.
IDM_SETCUSTOMCURSORSets the custom cursor.
IDM_SETDIRTYSets whether the document has been modified.
IDM_SETPRINTTEMPLATESets whether the document is a print template.
IDM_SHOWHIDE_CODEToggles the display of code.
IDM_SIZETOCONTROLNot supported.
IDM_SIZETOCONTROLHEIGHTNot supported.
IDM_SIZETOCONTROLWIDTHNot supported.
IDM_STATUSBARToggles the visibility of the status bar.
IDM_STOPNot supported.
IDM_STRIKETHROUGHNot supported.
IDM_SUBSCRIPTNot supported.
IDM_SUPERSCRIPTNot supported.
IDM_TABLENot implemented.
IDM_TEMPLATE_PAGESETUPPasses the print settings of the Page Setup dialog box.
IDM_TEXTAREAOverwrites a multiline text input control on the text selection.
IDM_TEXTBOXOverwrites a text control on the text selection.
IDM_TOOLBARSToggles the visibility of the toolbar.
IDM_UNBOOKMARKRemoves any bookmark from the current selection.
IDM_UNDERLINEToggles the current selection between underlined and not underlined.
IDM_UNDOUndo the previous command.
IDM_UNLINKRemoves any hyperlink from the current selection.
IDM_UNORDERLISTConverts the text selection into an ordered list.
IDM_VIEWSOURCELaunches the configured HTML source viewer.
IECMDID_BEFORENAVIGATE_DOEXTERNALBROWSEStarts navigation in a new window.
IECMDID_BEFORENAVIGATE_GETIDLISTRetrieves a buffer that contains the item identifier list.
IECMDID_BEFORENAVIGATE_GETSHELLBROWSERetrieves whether the pending navigation is to a shell folder.
IECMDID_CLEAR_AUTOCOMPLETE_FOR_FORMSClears data saved in forms.
IECMDID_GET_INVOKE_DEFAULT_BROWSER_ON_NEW_WINDOWGets 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_WINDOWSets 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_FORMSSets the user ID of the autocompletion data store.