Results 1 to 3 of 3

Thread: IE Favorites Folder

  1. #1
    Guest
    Hi,

    Does anyone know how to access the content of IE Favorites Folder or Netscape Bookmark?

    Any help is appreciated.

    Rgds,
    D4vid.

  2. #2
    Fanatic Member Dim's Avatar
    Join Date
    Jul 2000
    Posts
    620
    Have a look at this code sample...it think it will help you.


    Gl,
    D!m
    Dim

  3. #3
    Fanatic Member gwdash's Avatar
    Join Date
    Aug 2000
    Location
    Minnesota
    Posts
    666
    Some Code i wrote for just that:

    Add a Combo Box and a Module
    IE ONLY
    Code:
    Public Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As String) As Long
    
    Declare Function SHGetSpecialFolderPath Lib "shell32.dll" Alias "SHGetSpecialFolderPathA" (ByVal hwndOwner As Long, ByVal lpszPath As String, ByVal nFolder As Long, ByVal fCreate As Long) As Long
    Const CSIDL_FAVORITES = &H6
    Public Sub PoplulateFavorites()
    
    ' Display the path of the directory used as the Favorites
    ' special folder.
    Dim pathname As String  ' receives the path of My Documents
    Dim retval As Long  ' return value
    
    ' Make enough room in the buffer to receive the string.
    pathname = Space(260)
    ' Get the path name of the My Documents special folder
    retval = SHGetSpecialFolderPath(Form1.hWnd, pathname, CSIDL_FAVORITES, 0)
    ' Remove the empty space from the string.
    pathname = Left(pathname, InStr(pathname, vbNullChar) - 1)
    ' Display the result.
    Dim FileCount As Integer
    Dim TempStr As String
    TempStr = Dir(pathname & "\*.url")
    FileCount = 1
    Do While TempStr <> ""
    TempStr = Left(TempStr, Len(TempStr) - 4)
    Form1.cboFavorites.AddItem TempStr
    TempStr = Dir
    FileCount = FileCount + 1
    Loop
    ReDim URLs(1 To FileCount)
    Dim i As Integer
    For i = 1 To FileCount
    URLs(i) = GetURL(pathname & "\" & Form1.cboFavorites.List(i - 1) & ".url")
    Next i
    OnLoad = True
    Form1.cboFavorites.ListIndex = 0
    OnLoad = False
    End Sub
    Private Function GetURL(Path As String) As String
    
    Dim uname As String  ' receives the value read from the INI file
    Dim slength As Long  ' receives length of the returned string
    
    uname = Space(255)  ' provide enough room for the function to put the value into the buffer
    ' Read from the INI file
    slength = GetPrivateProfileString("InternetShortcut", "URL", "", uname, 255, Path)
    uname = Left(uname, slength)  ' extract the returned string from the buffer
    GetURL = uname
    
    End Function
    GWDASH
    [b]VB6, Perl, ASP, HTML, JavaScript, VBScript, SQL, C, C++, Linux , Java, PHP, MySQL, XML[b]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width