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(st rIEFavouri tes & "\" & 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?
Here is an example of the code i have been using:
Set oShortCut = wshshell.CreateShortcut(st
'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?
ASKER
but what is it for favourites? TargetPath did not work. I want to find the URL of a favourite.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Dim WshShell As Object
Dim strDesktop As String
Dim oMyShortCut As Object
Set WshShell = CreateObject("Wscript.shel
If (WshShell Is Nothing) Then Exit Sub
strDesktop = WshShell.SpecialFolders("D
Set oMyShortCut = WshShell.CreateShortcut(st
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