Useful FrontPage Links

 

I had a bunch of FrontPage shortcuts lying around, so I thought that I should list them together in a single blog.

FrontPage Themes and Templates

Much like inserting a hit counter on your web page, nothing screams "amateur" faster than using one of the built-in FrontPage themes or templates to design your web site. That being said, not all FrontPage themes and templates are bad - it's just that many of them are so awful that they give the rest of the market a bad name.

Personally, I have seen several professionally-designed templates that use FrontPage's Dynamic Web Templates (*.DWT) to construct the look and feel for some really great-looking web sites. It pays to be choosy, of course, and find the right theme/template that works for your target audience. With that in mind, I have several theme and template sites listed below.

For a large collection of non-FrontPage-specific templates, see the Open Source Web Design website at the following URL:

FrontPage Add-ins

At one time there were a bunch of add-ins for FrontPage lying around on the Internet, but sadly those days are gone. Just the same, here are a few of the remaining links that contain Add-ins for FrontPage:

FrontPage Administration

This is probably one of the most useful links for the FrontPage Server Extensions, but be forewarned - it's not an easy guide to follow:

FrontPage Software Development Kits (SDKs)

The FrontPage SDKs are no longer available from Microsoft, so I have them mirrored here:

File DescriptionFile LinkFile Size
FrontPage 1.0 SDK fpsdk10.zip 3.25 mb
FrontPage 1.1 SDK fpsdk11.zip 706.24 kb
FrontPage 97 SDK fpsdk20.zip 1.04 mb
FrontPage 98 SDK fpsdk30.zip 1.46 mb
FrontPage 2000 SDK fpsdk40.zip 797.12 kb
FrontPage 2002 SDK fpsdk50.zip 1.52 mb

2025 UPDATE: This post was written several years ago, and many of the links were no longer there. However, during a review of old blogs, I updated the old URLs to use the Internet Archive, so the links in this blog appear to work as they did when the blog was first written.

Using WSH to create an off-line backup of a FrontPage-enabled Web Site

As the old adage says, "Necessity is the mother of invention." With that in mind, I had a friend drop by my office the other day and ask me a question that started me on another quest for code.

What he asked me was whether there was a way where he could create an off-line backup of his web site. Of course, there are whole sections of the industry these days that are devoted to such things, but he wanted a simple way to create a backup on his home or work computer of his web site that is hosted at an ISP. Some time ago I wrote a FrontPage VBA macro for another friend that could be used to automate publishing, but only from within the FrontPage application itself. Since the FrontPage application exists as a COM object, I theorized that I could rewrite the code from the macro into a Windows Script Host (WSH) application that should do the trick. The code that you see below is the results of my little 'experiment'.

Usage Notes:

  • To use this script, you need to have a copy of FrontPage installed on the computer where you run the script.
  • In the script code you will need to update the source web site's URL and destination folder, as well as the user name and password to use when opening the source web site.
  • The WSH script will create a folder under "c:\backups" that will contain a folder named for your web site, and then it will create folders underneath the web site folder that are a concatenation of the current date and time. (This allows automating or manually re-running the script several times.)

Once you have taken the above items into account, copy & paste the script code into Notepad and save it to your computer with a "*.vbs" file extension. To execute the code, just double-click the script. The script will pop-up a message box when it has finished publishing a copy of the web site to your computer.

Option Explicit

' --------------------------------------------------
'
' Declare our constants.
'
' --------------------------------------------------

Const fpPublishAddToExistingWeb = 2
Const fpPublishCopySubwebs = 4
Const fpPublishLogInTempDir = 8
Const fpPublishCopyAllFiles = 64

' --------------------------------------------------
'
' This section defines the publishing variables.
'
' --------------------------------------------------

Dim strSourceUrl, strDestinationFolder
Dim strUsername, strPassword
Dim strBackupDate, strBackupTime

strBackupDate = Cstr(Year(Date())) & _
    Right("00" & Cstr(Month(Date())),2) & _
    Right("00" & Cstr(Day(Date())),2)
strBackupTime = Right("00" & Cstr(Hour(Time())),2) & _
    Right("00" & Cstr(Minute(Time())),2) & _
    Right("00" & Cstr(Second(Time())),2)

strSourceUrl = "https://www.example.com/"
strDestinationFolder = "c:\Backups\www.example.com\" & _
    strBackupDate & "_" & strBackupTime

strUsername = "server\administrator"
strPassword = "Password1"

' --------------------------------------------------
'
' This section checks to see if FrontPage is
' installed, and exits if it is not installed.
'
' --------------------------------------------------

' wait 10 seconds to "debounce" the server
WScript.Sleep 10000

' get a FrontPage Application object
Dim objFP: Set objFP = WScript.CreateObject("FrontPage.Application")

' exit if the object does not exist
If Err.Number = -2147352567 Then WScript.Quit

' --------------------------------------------------
'
' This section publishes the webs.
'
' --------------------------------------------------

' sanitize the publishing path
strDestinationFolder = CleanPath(strDestinationFolder)

' only continue the path can actually be created
If MakePath(strDestinationFolder) = True Then

    ' open the root web on the source
    objFP.Webs.Open strSourceUrl, strUsername, strPassword

    ' publish the root web to the destination
    objFP.ActiveWeb.Publish strDestinationFolder, _
        fpPublishAddToExistingWeb + fpPublishCopySubwebs + fpPublishCopyAllFiles + fpPublishLogInTempDir

    ' close the root web
    objFP.ActiveWeb.Close

End If

' --------------------------------------------------
'
' This section cleans up and exits.
'
' --------------------------------------------------

Set objFP = Nothing
WScript.Quit

' ----------------------------------------
'
' This function builds a path
'
' PASS: File path to construct
' RETURN: TRUE/FALSE for success/failure
'
' ----------------------------------------

Function MakePath(tmpText)
    On Error Resume Next
    Dim tx,ty,tz
    Dim tmpFSO
    Dim blnTempStatus
    Set tmpFSO = WScript.CreateObject("Scripting.FileSystemObject")
    blnTempStatus = True
    ty = Split(tmpText,"\")
    For tx = 0 To UBound(ty)
        tz = tz & ty(tx) & "\"
        If tmpFSO.FolderExists(tz) = False Then
            tmpFSO.CreateFolder(tz)
            If Err.Number <> 0 Then blnTempStatus = False
        End If
    Next
    MakePath = blnTempStatus
End Function

' ----------------------------------------
'
' This function sanitizes a path for valid characters
'
' PASS: File path to construct
' RETURN: New path
'
' ----------------------------------------

Function CleanPath(tmpText)
    On Error Resume Next
    Const tmpValid = "\.-1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
    Dim tx,ty,tz
    For tx = 1 To Len(tmpText)
        ty = Mid(tmpText,tx,1)
        If (InStr(tmpValid,ty)>0) Or (tx=2 and ty=":") Then
            tz = tz & ty
        Else
            tz = tz & "_"
        End If
    Next
    CleanPath = tz
End Function

Happy coding!


Note: This blog was originally posted at http://blogs.msdn.com/robert_mcmurray/