IE Favorites 
Author Message
 IE Favorites

Would like to programatically read and write IE Fav's

can ne1 point me in the right direction

tia
meh



Mon, 17 Oct 2005 21:28:36 GMT  
 IE Favorites
Here is some code that will read in all the URLs in the favorites folder and
put them in a rich text box. It does not take into consideration the URLs
that might be in subfolders of the favorites folder.

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
        Dim FavoritesPath As String
        FavoritesPath =
System.Environment.GetFolderPath(Environment.SpecialFolder.Favorites)
        Dim s As String
        Dim MyDirectory As New System.IO.DirectoryInfo(FavoritesPath)
        Dim FileArray As System.IO.FileSystemInfo() =
MyDirectory.GetFileSystemInfos()
        Dim info As System.IO.FileSystemInfo
        Dim sr As System.IO.StreamReader
        For Each info In FileArray
            If LCase(Microsoft.VisualBasic.Right(info.FullName, 4)) = ".url"
Then
                s = s & info.Name & vbCrLf
                sr = System.IO.File.OpenText(info.FullName)
                Do While sr.Peek <> -1
                    s = s & sr.ReadLine()
                Loop
                sr.Close()
                s = s & vbCrLf & vbCrLf
            End If
        Next
        Me.RichTextBox1.Text = s
    End Sub


Quote:
> Would like to programatically read and write IE Fav's

> can ne1 point me in the right direction

> tia
> meh



Tue, 18 Oct 2005 01:07:57 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Creating IE favorites

2. IE Favorites & WebBrowser Control

3. How do I launch IE favorites from VBScript?

4. IE Favorite style control used in MDI application

5. IE favorites

6. how to get the IE favorites?

7. Use VB to determine location of IE Favorites...

8. IE Favorites

9. IE Favorites?

10. IE Favorites Path

11. IE Favorites & WEbBrowser Control

12. Load listbox with IE history or favorites

 

 
Powered by phpBB® Forum Software