Opening the Favorites pane of Internet Explorer

I want to create a button on an HTML page, that when clicked will open the Favorites pane on the left (the same as clicking the Favorites button on the toolbar).  I also need to do the same for the History button.  

My application window will not have the toolbar displayed, but I need to have access to these two features.

Any suggestions?

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mmmm...I don't think you can.

I was thinking that you could do it using window.external, but looking here:

you will see there is no such option.


This is going to be prevented by browser security I think; at least for

If you could access favourites from scripting on the page it would violate
the users privacy.  It would make it possible to see what was in the
favourites folder.

I don't think the history object has a method for accessing the information
from JavaScript.  

Both of these might be possibile with some kind of activeX control, which
the user would have to accept.

CorporateRobotAuthor Commented:
You are both echoing what I suspected (that it is not possible).  I was hoping it could be possible somehow since I am not trying to alter the user's favorites; all I want to do is bring up the pane and let them alter their own favorites.  

Since this is an intranet app, my last resort, plan "B" is to create a Visual Basic App with a browser control, but I was hoping to avoid that.

Thanks for looking into it. . .
Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

only supported way is via BHO:

"HOWTO: Programmatically Active a Band Object"

since it is an intranet, use of BHOs should be ok yes?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
CorporateRobotAuthor Commented:
Thanks AzraSound.  

Yes, it is an intranet only application, so this looks like it might work for my needs.  However, since I am not a C programmer, I am going to have to recruit some help to try this out.  I'll let you know how it goes.
actually, you can create BHO's in VB, but it requires you use a type library that exposes the interfaces you need (e.g., IObjectWithSite) in such a way that they are accessible to a VB programmer.  i have such a type library at my home machine if you are interested
CorporateRobotAuthor Commented:
Sure, that would be great if you could provide that.  If it is too much to post you can e-mail it to me at:

Thanks for the help.  It is easy to see why you are a top expert!
i have sent the type lib and small sample to your email addy.  for those reading this, here is the IDL code for the type library.  use the MIDL compiler that ships with Visual Studio to compile it into a type library which you can then reference in your VB app.  this type library was originally posted at but has been included now in a larger type library at the author's site which can be downloaded here:

    helpstring("Edanmo's IObjectWithSite & Band interfaces v2.10"),
library IOWS {


    typedef LONG BOOL;
    typedef unsigned char BYTE;

    typedef struct RECT {
        LONG Left;
        LONG Top;
        LONG Right;
        LONG Bottom;
    } RECT;


    typedef struct POINT {
        LONG x;
        LONG y;
    } POINT;

    typedef struct UUID {
        LONG Data1;
        SHORT Data2;
        SHORT Data3;
        BYTE Data4[8];
    } UUID;
    interface IUnknown {

        HRESULT QueryInterface(
            [in] UUID *riid,
            [out, retval] IUnknown **ppvObject);

        LONG AddRef();
        LONG Release();

    interface IObjectWithSite : stdole.IUnknown {

        [helpstring("Sets the object site")]
        HRESULT SetSite(
            [in] stdole.IUnknown *pUnkSite);

        [helpstring("Gets the object site")]
        HRESULT GetSite(
            [in, out] UUID *riid,
            [out, retval] stdole.IUnknown **ppvSite);

    interface IOleWindow : stdole.IUnknown {

        HRESULT GetWindow(
            [out, retval] LONG *phwnd);

        HRESULT ContextSensitiveHelp(
            [in] BOOL fEnterMode);

    interface IDockingWindow : stdole.IUnknown {

    // IOleWindow members
        HRESULT GetWindow(
            [out, retval] LONG *phwnd);

        HRESULT ContextSensitiveHelp(
            [in] BOOL fEnterMode);

    // IDockingWindow members
            HRESULT ShowDW(
                [in] BOOL fShow);

            HRESULT CloseDW(
                [in] LONG dwReserved);

            HRESULT ResizeBorderDW(
                [in, out] RECT *prcBorder,
                [in] LONG punkToolbarSite,
                [in] BOOL fReserved);

    interface IDockingWindowSite : IOleWindow {

        HRESULT GetBorderDW(
            [in] stdole.IUnknown* punkObj,
            [in, out] RECT *prcBorder);

        HRESULT RequestBorderSpaceDW(
            [in] stdole.IUnknown* punkObj,
            [in, out] BORDERWIDTHS *pbw);

        HRESULT SetBorderSpaceDW(
            [in] stdole.IUnknown* punkObj,
            [in, out] BORDERWIDTHS *pbw);

    typedef enum DESKBANDINFO_Masks {
        DBIM_MINSIZE    = 0x0001,
        DBIM_MAXSIZE    = 0x0002,
        DBIM_INTEGRAL   = 0x0004,
        DBIM_ACTUAL     = 0x0008,
        DBIM_TITLE      = 0x0010,
        DBIM_MODEFLAGS  = 0x0020,
        DBIM_BKCOLOR    = 0x0040,

    typedef enum DESKBANDINFO_ModeFlags {
        DBIMF_NORMAL            = 0x0000,
        DBIMF_VARIABLEHEIGHT    = 0x0008,
        DBIMF_DEBOSSED          = 0x0020,
        DBIMF_BKCOLOR           = 0x0040,
    } DESKBANDINFO_ModeFlags;

    typedef struct {
        DESKBANDINFO_Masks dwMask;
        POINT ptMinSize;
        POINT ptMaxSize;
        POINT ptIntegral;
        POINT ptActual;
        BYTE wszTitle[512];
        DESKBANDINFO_ModeFlags dwModeFlags;
        LONG crBkgnd;

    typedef enum GetBandInfo_ViewModes {
        DBIF_VIEWMODE_NORMAL         = 0x0000,
        DBIF_VIEWMODE_VERTICAL       = 0x0001,
        DBIF_VIEWMODE_FLOATING       = 0x0002,
        DBIF_VIEWMODE_TRANSPARENT    = 0x0004,
    } GetBandInfo_ViewModes;

    interface IDeskBand : stdole.IUnknown {

    // IOleWindow members
        HRESULT GetWindow(
            [out, retval] LONG *phwnd);

        HRESULT ContextSensitiveHelp(
            [in] BOOL fEnterMode);

    // IDockingWindow members
        HRESULT ShowDW(
            [in] BOOL fShow);

        HRESULT CloseDW(
            [in] LONG dwReserved);

        HRESULT ResizeBorderDW(
            [in, out] RECT *prcBorder,
            [in] LONG punkToolbarSite,
            [in] BOOL fReserved);

        // IDeskBand members
        HRESULT GetBandInfo(
            [in] LONG dwBandID,
            [in] GetBandInfo_ViewModes dwViewMode,
            [in, out] DESKBANDINFO *pdbi);

    interface IPersist : stdole.IUnknown {

        HRESULT GetClassID (
            [in, out] UUID *pClassID);


    interface IPersistStream : stdole.IUnknown {

        // IPersist members
        HRESULT GetClassID (
            [in, out] UUID *pClassID);

        // IPersistStream members
        HRESULT IsDirty(void);

        HRESULT Load (
            [in] IStream *pStm);

        HRESULT Save (
            [in] IStream *pStm,
            [in] BOOL fClearDirty);

        HRESULT GetSizeMax (
            [in] LONG pcbSize);

    typedef struct MSG {
        LONG hwnd;
        LONG message;
        LONG wParam;
        LONG lParam;
        LONG time;
        POINT pt;
    } MSG;

    interface IInputObjectSite : stdole.IUnknown {

        HRESULT OnFocusChangeIS(
            [in] IUnknown *punkObj,
            [in] BOOL fSetFocus);

    interface IInputObject : stdole.IUnknown {

        [helpstring("Activates or deactivates the object.  lpMsg may be NULL.\nReturns S_OK if the activation succeeded.")]
        HRESULT UIActivateIO(
            [in] BOOL fActivate,
            [in] MSG *lpMsg);

    [helpstring("Returns S_OK if the object has the focus, S_FALSE if not")]
        HRESULT HasFocusIO(void);

        [helpstring("Allow the object to process the message.\nReturns S_OK if the message was processed (eaten).")]
        HRESULT TranslateAcceleratorIO(
            [in] MSG *lpMsg);


    interface IOleCommandTarget : stdole.IUnknown {

        typedef enum OLECMDF {
            OLECMDF_SUPPORTED       = 0x00000001,
            OLECMDF_ENABLED         = 0x00000002,
            OLECMDF_LATCHED         = 0x00000004,
            OLECMDF_NINCHED         = 0x00000008,
            OLECMDF_INVISIBLE       = 0x00000010,
            OLECMDF_DEFHIDEONCTXTMENU = 0x00000020,
        } OLECMDF;

        typedef struct OLECMD {
            LONG cmdID;
            LONG cmdf;
        } OLECMD;

        typedef enum OLECMDTEXTF {
            OLECMDTEXTF_NONE        = 0,
            OLECMDTEXTF_NAME        = 1,
            OLECMDTEXTF_STATUS      = 2,
        } OLECMDTEXTF;

        typedef struct OLECMDTEXT{
            OLECMDTEXTF cmdtextf;
            LONG cwActual;
            LONG cwBuf;    /* size in wide chars of the buffer for text */
            BYTE rgwz[512]; /* Array into which callee writes the text */
        } OLECMDTEXT;

        typedef enum OLECMDEXECOPT {
            OLECMDEXECOPT_DODEFAULT         = 0,
            OLECMDEXECOPT_PROMPTUSER        = 1,
            OLECMDEXECOPT_SHOWHELP          = 3

        typedef enum OLECMDID {
            OLECMDID_OPEN                           = 1,
            OLECMDID_NEW                            = 2,
            OLECMDID_SAVE                           = 3,
            OLECMDID_SAVEAS                         = 4,
            OLECMDID_SAVECOPYAS                     = 5,
            OLECMDID_PRINT                          = 6,
            OLECMDID_PRINTPREVIEW                   = 7,
            OLECMDID_PAGESETUP                      = 8,
            OLECMDID_SPELL                          = 9,
            OLECMDID_PROPERTIES                     = 10,
            OLECMDID_CUT                            = 11,
            OLECMDID_COPY                           = 12,
            OLECMDID_PASTE                          = 13,
            OLECMDID_PASTESPECIAL                   = 14,
            OLECMDID_UNDO                           = 15,
            OLECMDID_REDO                           = 16,
            OLECMDID_SELECTALL                      = 17,
            OLECMDID_CLEARSELECTION                 = 18,
            OLECMDID_ZOOM                           = 19,
            OLECMDID_GETZOOMRANGE                   = 20,
            OLECMDID_UPDATECOMMANDS                 = 21,
            OLECMDID_REFRESH                        = 22,
            OLECMDID_STOP                           = 23,
            OLECMDID_HIDETOOLBARS                   = 24,
            OLECMDID_SETPROGRESSMAX                 = 25,
            OLECMDID_SETPROGRESSPOS                 = 26,
            OLECMDID_SETPROGRESSTEXT                = 27,
            OLECMDID_SETTITLE                       = 28,
            OLECMDID_SETDOWNLOADSTATE               = 29,
            OLECMDID_STOPDOWNLOAD                   = 30,
            OLECMDID_ONTOOLBARACTIVATED             = 31,
            OLECMDID_FIND                           = 32,
            OLECMDID_DELETE                         = 33,
            OLECMDID_HTTPEQUIV                      = 34,
            OLECMDID_HTTPEQUIV_DONE                 = 35,
            OLECMDID_ENABLE_INTERACTION             = 36,
            OLECMDID_ONUNLOAD                       = 37,
            OLECMDID_PROPERTYBAG2                   = 38,
            OLECMDID_PREREFRESH                     = 39,
            OLECMDID_SHOWSCRIPTERROR                = 40,
            OLECMDID_SHOWMESSAGE                    = 41,
            OLECMDID_SHOWFIND                       = 42,
            OLECMDID_SHOWPAGESETUP                  = 43,
            OLECMDID_SHOWPRINT                      = 44,
            OLECMDID_CLOSE                          = 45,
            OLECMDID_ALLOWUILESSSAVEAS              = 46,
            OLECMDID_DONTDOWNLOADCSS                = 47,
        } OLECMDID;

        typedef enum DBCOMMANDID {
            DBID_BANDINFOCHANGED    = 0,
            DBID_SHOWONLY           = 1,
            DBID_MAXIMIZEBAND       = 2,      // Maximize the specified band (VT_UI4 == dwID)
            DBID_PUSHCHEVRON        = 3,
            DBID_DELAYINIT          = 4,      // Note: _bandsite_ calls _band_ with this code
            DBID_FINISHINIT         = 5,      // Note: _bandsite_ calls _band_ with this code
        } DBCOMMANDID;

        typedef enum OLECMDERR {
            OLECMDERR_E_FIRST            = 0x80040100,
            OLECMDERR_E_NOTSUPPORTED     = 0x80040100,
            OLECMDERR_E_DISABLED         = 0x80040101,
            OLECMDERR_E_NOHELP           = 0x80040102,
            OLECMDERR_E_CANCELED         = 0x80040103,
            OLECMDERR_E_UNKNOWNGROUP     = 0x80040104,
        } OLECMDERR;

        HRESULT QueryStatus(
            [in] UUID *pguidCmdGroup,
            [in] LONG cCmds,
            [in, out] OLECMD *prgCmds,
            [in, out] OLECMDTEXT *pCmdText);

        HRESULT Exec(
            [in] UUID *pguidCmdGroup,
            [in] LONG nCmdID,
            [in] LONG nCmdexecopt,
            [in, defaultvalue(0)] VARIANT *pvaIn,
            [in, out, defaultvalue(0)] VARIANT *pvaOut);

    typedef enum OLECMDID_REFRESHFLAG {
        OLECMDIDF_REFRESH_NORMAL          = 0,
        OLECMDIDF_REFRESH_NO_CACHE        = 4,
        OLECMDIDF_REFRESH_RELOAD          = 5,

    typedef enum OleErrors {
        E_UNEXPECTED   = 0x8000FFFF,
        E_NOTIMPL      = 0x80004001,
        E_OUTOFMEMORY  = 0x8007000E,
        E_INVALIDARG   = 0x80070057,
        E_NOINTERFACE  = 0x80004002,
        E_POINTER      = 0x80004003,
        E_HANDLE       = 0x80070006,
        E_ABORT        = 0x80004004,
        E_FAIL         = 0x80004005,
        E_ACCESSDENIED = 0x80070005,
    } OleErrors;

    module ole32 {

      [helpstring("IWebBrowserApp interface ID")]
      const LPSTR sIID_IWebBrowserApp = "{0002DF05-0000-0000-C000-000000000046}";
      [helpstring("Internet Explorer service ID")]
      const LPSTR sSID_SInternetExplorer = "{0002DF05-0000-0000-C000-000000000046}";

      [helpstring("Bands Command Group ID")]
        const LPSTR sCGID_DeskBand = "{EB0FE172-1A3A-11D0-89B3-00A0C90A90AC)}";

        HRESULT CLSIDFromProgID(
            [in] LPWSTR lpszProgID,
            [in, out] UUID *lpclsid);

        HRESULT CLSIDFromString(
            [in] LPWSTR lpszProgID,
            [in, out] UUID *lpclsid);


      helpstring("IServiceProvider interface")
    interface IServiceProvider : stdole.IUnknown {

        HRESULT QueryService(
            [in] UUID *guidService,
            [in] UUID *riid,
            [out, retval] stdole.IUnknown ** ppvObject);

    typedef enum QueryContextMenuFlags {
        CMF_NORMAL              = 0x00000000,
        CMF_DEFAULTONLY         = 0x00000001,
        CMF_VERBSONLY           = 0x00000002,
        CMF_EXPLORE             = 0x00000004,
        CMF_NOVERBS             = 0x00000008,
        CMF_CANRENAME           = 0x00000010,
        CMF_NODEFAULT           = 0x00000020,
        CMF_INCLUDESTATIC       = 0x00000040,
        CMF_RESERVED            = 0xffff0000,
    } QueryContextMenuFlags;

    typedef enum GCSFlags {
        [helpstring("canonical verb")]
        GCS_VERBA        = 0x00000000,
        [helpstring("help text (for status bar)")]
        GCS_HELPTEXTA    = 0x00000001,
        [helpstring("validate command exists")]
        GCS_VALIDATEA    = 0x00000002,
        [helpstring("canonical verb (unicode)")]
        GCS_VERBW        = 0x00000004,
        [helpstring("help text (unicode version)")]
        GCS_HELPTEXTW    = 0x00000005,
        [helpstring("validate command exists (unicode)")]
        GCS_VALIDATEW    = 0x00000006,
        [helpstring("for bit testing - Unicode string")]
        GCS_UNICODE      = 0x00000004,
    } GCSFlags;

    typedef enum InvokeCommandMask {
        CMIC_MASK_HOTKEY        = 0x00000020,
        CMIC_MASK_ICON          = 0x00000010,
        CMIC_MASK_FLAG_NO_UI    = 0x00000400,
        CMIC_MASK_UNICODE       = 0x00004000,
        CMIC_MASK_NO_CONSOLE    = 0x00008000,
        CMIC_MASK_ASYNCOK       = 0x00100000,
        CMIC_MASK_PTINVOKE      = 0x20000000,
    } InvokeCommandMask;

    typedef struct CMINVOKECOMMANDINFO {
        LONG cbSize;
        [helpstring("Invoke mask")]
        InvokeCommandMask fMask;
        [helpstring("Might be NULL (indicating no owner window)")]
        LONG hwnd;
        [helpstring("Either a string or MAKEINTRESOURCE(idOffset)")]
        LONG lpVerb;
        [helpstring("Might be NULL (indicating no parameter)")]
        LONG lpParameters;
        [helpstring("Might be NULL (indicating no specific directory)")]
        LONG lpDirectory;
        [helpstring("One of SW_* values for ShowWindow() API")]
        LONG nShow;
        [helpstring("Hot key")]
        LONG dwHotKey;
        [helpstring("Icon handle")]
        LONG hIcon;

        helpstring("IContextMenu interface")
    interface IContextMenu : stdole.IUnknown {

        [helpstring("Adds menu items to the specified menu.")]
        HRESULT QueryContextMenu(
            [in] long hMenu,
            [in] long indexMenu,
            [in] long idCmdFirst,
            [in] long idCmdLast,
            [in] QueryContextMenuFlags uFlags);

        [helpstring("Carries out the command associated with a context menu item.")]
        HRESULT InvokeCommand(
            [in, out] CMINVOKECOMMANDINFO *lpici);
        [helpstring("Retrieves the language-independent command string or the help text for a context menu item.")]
        HRESULT GetCommandString(
            [in] long idCmd,
            [in] GCSFlags uType,
            [in, out] int *pwReserved,
            [in] long pszName,
            [in] int cchMax);

    interface IOleInPlaceUIWindow : IOleWindow {
        LONG GetBorder(
            [in, out] RECT* lprectBorder);
        LONG RequestBorderSpace(
            [in, out] RECT* pborderwidths);
        LONG SetBorderSpace(
            [in, out] RECT* pborderwidths);
        LONG SetActiveObject(
            [in] IUnknown * pActiveObject,
            [in] LONG pszObjName);

    interface IOleInPlaceFrame : IOleInPlaceUIWindow {
        LONG InsertMenus(
            [in] LONG hmenuShared,
            [in] LONG lpMenuWidths);
        LONG SetMenu(
            [in] LONG hmenuShared,
            [in] LONG holemenu,
            [in] LONG hwndActiveObject);
        LONG RemoveMenus(
            [in] LONG hmenuShared);
        LONG SetStatusText(
            [in] LONG pszStatusText);
        LONG EnableModeless(
            [in] BOOL fEnable);
        LONG TranslateAccelerator(
            [in, out] MSG *lpmsg,
            [in] short wID);

CorporateRobotAuthor Commented:
Thanks AzraSound.  I still have some integration work to implement into my pages, but the technique appears to work.  Thanks for the help.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development

From novice to tech pro — start learning today.