Link to home
Start Free TrialLog in
Avatar of willwatters
willwatters

asked on

How do I access a website that exists in favourites

I want to access a website that exists in favourites? I'm automating a task that will execute a website that exists in favourites.  Will someone please help me with this?
Avatar of anv
anv

hi willwatters

u can get help from here..

http://www.freevbcode.com/ShowCode.Asp?ID=495

the code is to add a site to favorites..

u can manipulate it to get the site from favorites..


good luck
Avatar of willwatters

ASKER

Do you know how i can do it using WshSpecialFolders object.

I have started the following code:

Dim oShell, oSpFolders

Set oShell = WScript.CreateObject("WScript.Shell")
Set oSpFolders = oShell.SpecialFolders

ASKER CERTIFIED SOLUTION
Avatar of anv
anv

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I tried the following code to access a web site in favourites, but it doesn't work. Will you please fix it for me.

Dim oShell, oSpFolders, i, strExamen
   
    strExamen = "Examen - Home Page"
   
    Set oShell = WScript.CreateObject("WScript.Shell")
    Set oSpFolders = oShell.SpecialFolders("Favourites")
   
    For i = 0 To oSpFolders.Count
        If oSpFolders.Item(i) = strExamen
            oIE.Navigate2 "http://WWW.examen.com"
            While oIE.Busy
                'wait for the page to load
            Wend
            GoTo GotExamenHP
        End If
    Next i

    MsgBox ("Error opening Examen Home Page : " & Err.Description)

GotExamenHP: