Fav2Web

VBA tool generating HTML or WML from your IE Favorites

Download goes here. If you like it, rate it here.


Functionality
Fav2Web takes your IE favorites or a subfolder of it and creates a HTML or WML file from it. This file can be included e.g. in your FrontPage Web to expose your favorites to the world and - more important - keep them up-to-date.
Fav2Web supports excluding subfolders from the creation and to tailor the creation to a particular subfolder. The code being generated is specified using an XSL style sheet allowing for greatest flexibility. However, although flexible, don't underestimate the effort to define a proper XSL of some complexity.

Prerequisites
Fav2Web is provided as VB or VBA source. In order to integrate it properly into a FrontPage VBA project, you need to add references to msxml 2.0 and VBScript Runtime to the project.

Installation
Fav2Web is delivered as a ZIP file containing VB/VBA source files, sample XSL style sheets and a sample Favorites directory. The .bas file is general purpose, i.e. it  can be used in a VB or in a FrontPage 2000 VBA project. The .frm file is specialized for being integrated into a FP 2000 VBA project. It makes use of the FrontPage 2000 object model in order to preset the paths of the XSL style sheet and the resulting .htm, .asp., or .wml file.
Installation in FP 2000 goes as follows.

  • Unzip the downloaded installation file
  • Open your FP VBA project window
  • Add the references described under Prerequisites
  • Import the .bas and the .frm file extracted from the ZIP file into your project

An alternative to this installation procedure is to copy the file "Microsoft FrontPage.fpm" from the zip file into your directory c:\Winnt\profiles\...\Application Data\Microsoft\FrontPage\Macros or whatever this directory corresponds to on your machine. The path depends on the Windows version and the regional settings on your machine.

Usage
I only want to explain here how Fav2Web is used within a FrontPage 2000 environment. When you want to use it in vanilla VB you have to build your own VB project around the fav2web.bas.
Assumed you have property installed Fav2Web, go to your FP web and create an XSL style sheet file in there. Select the XSL file in your folder list and invoke the macro for HTML/WML conversion. In the upcoming dialog enter the path of the target file you want to create and press the "Convert" button. If the conversion succeeds, add the created file to your web. I recommend to name the created file the same way as the XSL file except the extension. This allows the dialog to be smart when it is called next time to regenerate the file after you changed your favorites. 

How it works
Fav2Web first creates an XML structure for the Favorites folder or another folder containing URL shortcuts. Next, it applies an XSL style sheet to this XML. It is up to this style sheet to create HTML or WML which is stored into file within your WEB. It is also up to the XSL whether to create a self-contained HTML or WML or whether to create e.g. an ASP excerpt which can be included into another ASP. I personally prefer the latter because it gives me greater flexibility in defining the HTML or WML surrounding the URL list.

Known issues
What you get here is not a product but a private tool which I offer for public use. It can be used on a as-is basis without any warranty. However, when you find bugs or you have ideas for enhancements feel free to contact me.
Problem which I already know are:

  • Errors in the XSL style sheet are not reported properly
    The transformNode method used for applying the XSL doesn't produce useful error messages when the XSL is erroneous. For debugging these XSL problems I recommend to open the .xml file which is created using the IE. It is created into the same directory as the resulting .htm or .wml file. However, you have to consider that behaviour of IE and the transformNode is not identical. E.g. when the XML structure contains special characters these lead to errors in IE but are processed correctly by transformNode.
  • WML cannot be fully created
    A well-formed WML requires a DOCTYPE clause following the xml processing instruction. I found no way how to create this clause using a XSL style sheet. That's one reason why I prefer creating only the essential list of links using the XSL and include this list into a .asp.
  • FP macro has to be added manually
    FB VBA does not automatically offer public procedures in modules as macros in FP. This requires that you create a macro within FP or FP VBA and call the procedure frmFav2htm.ConvertFavorites from this macro.

Revisions

  • 23-Apr-00: Skip URLs with file attribute "hidden"
  • 16-Jan-00: Added file "Microsoft FrontPage.fpm" to fav2web.zip
  • 10-Jan-00: Initially submitted