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?
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("WScr ipt.Shell" )
Set oSpFolders = oShell.SpecialFolders
I have started the following code:
Dim oShell, oSpFolders
Set oShell = WScript.CreateObject("WScr
Set oSpFolders = oShell.SpecialFolders
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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("WScr ipt.Shell" )
Set oSpFolders = oShell.SpecialFolders("Fav ourites")
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:
Dim oShell, oSpFolders, i, strExamen
strExamen = "Examen - Home Page"
Set oShell = WScript.CreateObject("WScr
Set oSpFolders = oShell.SpecialFolders("Fav
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:
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