VBA Microsoft Internet Controls Library

The Microsoft Internet Controls Library can be used to programmatically interact with Internet Explorer.

Note: Internet Explorer is no longer supported by Microsoft and may not be available.

Public Sub Example()

    Dim IE As Object 'SHDocVw.InternetExplorer
    Set IE = CreateObject("InternetExplorer.Application")

    IE.Visible = True
    IE.navigate "https://www.bing.com/"

    Do Until IE.readyState = 4 'READYSTATE_COMPLETE
        DoEvents
    Loop

End Sub

Classes

Class Description
InternetExplorer Represents the Internet Explorer browser.
InternetExplorerMedium Represents the Internet Explorer browser with Medium Integrity Access Level. May be needed if using Protected Mode in IE8/IE9. Disable Protected Mode could fix issue. There is no ProgID/ClsID for InternetExplorerMedium but could be added to registry. See here and here and here.
IShellUIHelper Makes features available from the Windows Shell API.
IShellUIHelper2 Extends IShellUIHelper, adding support for custom search providers and scriptable "first run" settings.
IShellUIHelper3 Extends IShellUIHelper2, adding support for Windows Internet Explorer 8.
IShellUIHelper4 Extends IShellUIHelper3, adding methods that support pinned sites.
IShellUIHelper5 Adds special functions for Internet Explorer 10.
IShellUIHelper6 Adds special functions for Internet Explorer 11.
IShellUIHelper7
IShellUIHelper8
ShellNameSpace
ShellUIHelper Makes some shell features available.
ShellWindows Represents a collection of the open windows belonging to the Shell.
WebBrowser
WebBrowser_V1

Enums and Consts

CommandStateChangeConstants
  1. CSC_NAVIGATEBACK = 2
  2. CSC_NAVIGATEFORWARD = 1
  3. CSC_UPDATECOMMANDS = -1
NewProcessCauseConstants
  1. ProtectedModeRedirect = 1
OLECMDEXECOPT
  1. OLECMDEXECOPT_DODEFAULT = 0
  2. OLECMDEXECOPT_DONTPROMPTUSER = 2
  3. OLECMDEXECOPT_PROMPTUSER = 1
  4. OLECMDEXECOPT_SHOWHELP = 3
OLECMDF
  1. OLECMDF_DEFHIDEONCTXTMENU = 32
  2. OLECMDF_ENABLED = 2
  3. OLECMDF_INVISIBLE = 16
  4. OLECMDF_LATCHED = 4
  5. OLECMDF_NINCHED = 8
  6. OLECMDF_SUPPORTED = 1
OLECMDID
  1. OLECMDID_ACTIVEXINSTALLSCOPE = 66
  2. OLECMDID_ADDTRAVELENTRY = 60
  3. OLECMDID_ALLOWUILESSSAVEAS = 46
  4. OLECMDID_CLEARSELECTION = 18
  5. OLECMDID_CLOSE = 45
  6. OLECMDID_COPY = 12
  7. OLECMDID_CUT = 11
  8. OLECMDID_DELETE = 33
  9. OLECMDID_DONTDOWNLOADCSS = 47
  10. OLECMDID_ENABLE_INTERACTION = 36
  11. OLECMDID_ENABLE_VISIBILITY = 77
  12. OLECMDID_EXITFULLSCREEN = 81
  13. OLECMDID_FIND = 32
  14. OLECMDID_FOCUSVIEWCONTROLS = 57
  15. OLECMDID_FOCUSVIEWCONTROLSQUERY = 58
  16. OLECMDID_GETPRINTTEMPLATE = 52
  17. OLECMDID_GETUSERSCALABLE = 75
  18. OLECMDID_GETZOOMRANGE = 20
  19. OLECMDID_HIDETOOLBARS = 24
  20. OLECMDID_HTTPEQUIV = 34
  21. OLECMDID_HTTPEQUIV_DONE = 35
  22. OLECMDID_LAYOUT_VIEWPORT_WIDTH = 71
  23. OLECMDID_MEDIA_PLAYBACK = 78
  24. OLECMDID_NEW = 2
  25. OLECMDID_ONBEFOREUNLOAD = 83
  26. OLECMDID_ONTOOLBARACTIVATED = 31
  27. OLECMDID_ONUNLOAD = 37
  28. OLECMDID_OPEN = 1
  29. OLECMDID_OPTICAL_GETZOOMRANGE = 64
  30. OLECMDID_OPTICAL_ZOOM = 63
  31. OLECMDID_PAGEACTIONBLOCKED = 55
  32. OLECMDID_PAGEACTIONUIQUERY = 56
  33. OLECMDID_PAGEAVAILABLE = 74
  34. OLECMDID_PAGESETUP = 8
  35. OLECMDID_PASTE = 13
  36. OLECMDID_PASTESPECIAL = 14
  37. OLECMDID_POPSTATEEVENT = 69
  38. OLECMDID_PREREFRESH = 39
  39. OLECMDID_PRINT = 6
  40. OLECMDID_PRINT2 = 49
  41. OLECMDID_PRINTPREVIEW = 7
  42. OLECMDID_PRINTPREVIEW2 = 50
  43. OLECMDID_PROPERTIES = 10
  44. OLECMDID_PROPERTYBAG2 = 38
  45. OLECMDID_REDO = 16
  46. OLECMDID_REFRESH = 22
  47. OLECMDID_SAVE = 3
  48. OLECMDID_SAVEAS = 4
  49. OLECMDID_SAVECOPYAS = 5
  50. OLECMDID_SCROLLCOMPLETE = 82
  51. OLECMDID_SELECTALL = 17
  52. OLECMDID_SET_HOST_FULLSCREENMODE = 80
  53. OLECMDID_SETDOWNLOADSTATE = 29
  54. OLECMDID_SETFAVICON = 79
  55. OLECMDID_SETPRINTTEMPLATE = 51
  56. OLECMDID_SETPROGRESSMAX = 25
  57. OLECMDID_SETPROGRESSPOS = 26
  58. OLECMDID_SETPROGRESSTEXT = 27
  59. OLECMDID_SETTITLE = 28
  60. OLECMDID_SHOWFIND = 42
  61. OLECMDID_SHOWMESSAGE = 41
  62. OLECMDID_SHOWMESSAGE_BLOCKABLE = 84
  63. OLECMDID_SHOWPAGEACTIONMENU = 59
  64. OLECMDID_SHOWPAGESETUP = 43
  65. OLECMDID_SHOWPRINT = 44
  66. OLECMDID_SHOWSCRIPTERROR = 40
  67. OLECMDID_SHOWTASKDLG = 68
  68. OLECMDID_SHOWTASKDLG_BLOCKABLE = 85
  69. OLECMDID_SPELL = 9
  70. OLECMDID_STOP = 23
  71. OLECMDID_STOPDOWNLOAD = 30
  72. OLECMDID_UNDO = 15
  73. OLECMDID_UPDATE_CARET = 76
  74. OLECMDID_UPDATEBACKFORWARDSTATE = 62
  75. OLECMDID_UPDATECOMMANDS = 21
  76. OLECMDID_UPDATEPAGESTATUS = 48
  77. OLECMDID_UPDATETRAVELENTRY = 61
  78. OLECMDID_UPDATETRAVELENTRY_DATARECOVERY = 67
  79. OLECMDID_USER_OPTICAL_ZOOM = 73
  80. OLECMDID_VIEWPORT_MODE = 70
  81. OLECMDID_VISUAL_VIEWPORT_EXCLUDE_BOTTOM = 72
  82. OLECMDID_WINDOWSTATECHANGED = 65
  83. OLECMDID_ZOOM = 19