Script to Export Favorites from Internet Explorer

Hello,

Is there a Visual Basic script that can be written to export Internet Explorer Favorites to a bookmark.htm file?

Thanks.

March 22nd, 2010 9:48am

Here's one that exports the favorites to a bookmark.htm file:

Const FAVOURITES = &H6&

Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(FAVOURITES)
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objBookMark = objFSO.CreateTextFile(".\bookmark.htm", 2)
objBookMark.WriteLine "<TITLE>Bookmarks</TITLE>"
objBookMark.WriteLine "<H1>Bookmarks</H1>"
objBookMark.WriteLine "<DL><p>"
For Each objItem in objFolder.Items
    If objItem.IsLink Then
        Set objLink = objItem.GetLink
        objBookMark.Write "<A HREF=""" & objLink.Target & """>" & objItem.Name & "</A></br>"
    End If
Next
objBookMark.WriteLine "</DL></p>"
objBookMark.Close

Regards,

Salvador Manaois III
MCSE MCSA MCTS MCITP C|EH CIWA
----------------------------------------------------------------------------
Bytes & Badz: http://badzmanaois.blogspot.com
My Passion: http://www.flickr.com/photos/badzmanaois
My Scripting Blog: http://sgwindowsgroup.org/blogs/badz  

 

Free Windows Admin Tool Kit Click here and download it now
March 22nd, 2010 10:43am

Thank you Salvador!
March 22nd, 2010 10:54am

No problem. =)

Regards,
Salvador

Free Windows Admin Tool Kit Click here and download it now
March 22nd, 2010 11:11am

Hi

I know this is old, but this is exactly what I'm after.

The code that Salvador provided works perfectly... except it only exports .LNKs / URLs  in the Favorites root.

Is anyone able to provide a little more scripting information to create and preserve the .LNKs / URLs in subfolders please?

Many thanks, Phil

August 13th, 2013 2:09pm

Hello

Excellent script but i also need to be able to export the Favourites bar, can that be added to the script as well, i know absolutly nothing about scripting so hope you can help.

Regards Mick 

Free Windows Admin Tool Kit Click here and download it now
April 29th, 2014 4:53am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics