Link to home
Start Free TrialLog in
Avatar of willwatters
willwatters

asked on

How do you check the url of a favourite in IE

I'm trying to find the URL of a favourite in IE, automatically using vb.

Here is an example of the code i have been using:

Set oShortCut = wshshell.CreateShortcut(strIEFavourites & "\" & oFile.Name)

'Check shortcut target/TargetPath property
If oShortCut.TargetPath <> strFavouritePath Then

'etc .....

The oShortCut.TargetPath does not work as it is used to find the target path of shortcuts.  What is it to find the URL in favourites please?

 


       
Avatar of EDDYKT
EDDYKT
Flag of Canada image

Private Sub Command1_Click()
   Dim WshShell As Object
   Dim strDesktop As String
   Dim oMyShortCut As Object
   
   Set WshShell = CreateObject("Wscript.shell")
   If (WshShell Is Nothing) Then Exit Sub
   strDesktop = WshShell.SpecialFolders("Desktop")
   Set oMyShortCut = WshShell.CreateShortcut(strDesktop + "\Sample.lnk")
   oMyShortCut.WindowStyle = 4  '3- Maximized 7=Minimized  4=Normal
   'oMyShortcut.IconLocation = "C:\myicon.ico"
   oMyShortCut.TargetPath = "%windir%\notepad.exe"
   oMyShortCut.Arguments = "c:\temp.txt"
   'oMyShortcut.Hotkey = "ALT+CTRL+F"
   oMyShortCut.Save
End Sub


https://www.experts-exchange.com/questions/20678568/Create-shortcut-in-VB-with-paramaters.html
Avatar of willwatters
willwatters

ASKER

but what is it for favourites? TargetPath did not work. I want to find the URL of a favourite.
ASKER CERTIFIED SOLUTION
Avatar of VBtorment
VBtorment

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