This topic has not yet been rated Rate this topic

IDM_AUTOURLDETECT_MODE Command ID

.NET Framework 3.0

Turns automatic URL detection on and off.

C++ Information

Command group CGID_MSHTML (defined in mshtmhst.h)
Symbolic constant IDM_AUTOURLDETECT_MODE
User interface None. Set nCmdExecOpt to OLECMDEXECOPT_DONTPROMPTUSER.
IOleCommandTarget::Exec parameters
pvaIn VARIANT of type VT_BOOL specifying whether automatic URL detection is to be on or off.
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

By default, automatic URL detection is on when the MSHTML Editor is activated. The editor will automatically create a hyperlink for any text that is formatted as a URL.

Minimum Availability

Internet Explorer 5.5 and later.

See Also

Using the MSHTML Editor's Extra Features
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
Not applicable to execCommand

In IE8 and below, you cannot use execCommand from JavaScript to disable automatic hyperlinking, because execCommand takes a string command identifier, and no string is mapped to IDM_AUTOURLDETECT_MODE.

A new command constant AutoUrlDetect is supported in IE9, allowing script to disable automatic hyperlinking as follows: 

    document.execCommand("AutoUrlDetect", false, false)