FrontPage Macro: Reformat HTML

Using this FrontPage VBA Macro

This FrontPage VBA Macro is designed to reformat the HTML for every HTML or ASP file within the currently open web site.

FrontPage VBA Macro Example Code

Public Sub ReformatHTML()
Dim objWebFile As WebFile
Dim strExt As String
Dim cbCommandBar As CommandBar
Dim cbCommandBarControl As CommandBarControl

If Len(Application.ActiveWeb.Title) = 0 Then
MsgBox "A web must be open." & vbCrLf & vbCrLf & "Aborting.", vbCritical
Exit Sub
End If

For Each objWebFile In Application.ActiveWeb.AllFiles
strExt = LCase(objWebFile.Extension)
If strExt = "htm" Or strExt = "html" Or strExt = "asp" Then
objWebFile.Edit
Application.ActivePageWindow.ViewMode = fpPageViewHtml
DoEvents
Set cbCommandBar = Application.CommandBars("Html Page View Context Menu")
Set cbCommandBarControl = cbCommandBar.FindControl( _
Type:=msoControlButton, _
Id:=CommandBars("Html Page View Context Menu").Controls("Reformat HT&ML").Id)
cbCommandBarControl.Execute
DoEvents
Application.ActivePageWindow.Save
Application.ActivePageWindow.Close
End If
Next

End Sub

FPSE 2002 RC1 for Windows Server 2008 and Windows Vista (x86/x64)

Earlier today Microsoft and Ready-to-Run Software released to web the Release Candidate 1 (RC1) version of the FrontPage 2002 Server Extensions for IIS 7.0 on Windows Server 2008 and Windows Vista. This build now includes a combined installation package for 32-bit and 64-bit versions of Windows.

Listed below is the link for the download page for the combined 32-bit/64-bit installation package:

FPSE 2002 RC1 for IIS 7 is supported on all of the the following operating systems:

  • Windows Server 2008 (Code Name "Longhorn")
  • Windows Vista Ultimate
  • Windows Vista Home Premium
  • Windows Vista Business
  • Windows Vista Enterprise

Once again, additional documentation about installing and using this version of FPSE 2002 can be found at the following URL:

Installing the FrontPage 2002 Server Extensions:
http://go.microsoft.com/fwlink/?LinkId=88546

While this release is a beta version and not technically supported, feedback about this release and requests for information can be sent to fpbeta@rtr.com or posted to the following web forum:

IIS7 - Publishing:
http://forums.iis.net/1045.aspx

Thanks!


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

FPSE 2002 RC0 for Windows Server 2008 and Windows Vista (x86/x64)

Earlier today Microsoft and Ready to Run Software released to web the Release Candidate 0 (RC0) version of the FrontPage 2002 Server Extensions for IIS 7.0 on Windows Server 2008 and Windows Vista. This build now includes support for 64-bit Windows, and addresses several issues that we've seen since the FPSE release that shipped last April.

Listed below are the links for the download pages for each of the individual installation packages:

FPSE 2002 RC0 for IIS 7 is supported on all of the the following operating systems:

  • Windows Server 2008 (Code Name "Longhorn")
  • Windows Vista Ultimate
  • Windows Vista Home Premium
  • Windows Vista Business
  • Windows Vista Enterprise

Additional documentation about installing and using this version of FPSE 2002 can be found at the following URL:

Installing the FrontPage 2002 Server Extensions:
http://go.microsoft.com/fwlink/?LinkId=88546

Quoting and updating some of my notes from the last release:

It should be noted that this version of FPSE 2002 is a beta release and is therefore unsupported. Also, this version of FPSE 2002 introduces no new functionality; it is essentially the same version of FPSE 2002 that was created for Windows Server 2003 that has been updated to work on Windows Server 2008 (code name "Longhorn") and Windows Vista. That being said, this version of FPSE 2002 will enable web hosters and developers to author their web content on servers or workstations that are running IIS 7.0 on Windows Server 2008 and Windows Vista.

While this release is a beta version and not technically supported, feedback about this release and requests for information can be sent to fpbeta@rtr.com or posted to the following web forum:

IIS7 - Publishing:
http://forums.iis.net/1045.aspx

Thanks!

FrontPage 2002 Server Extensions Beta for Longhorn and Vista

Following up on my FrontPage Server Extensions on Vista and Longhorn blog post from last February, I'm happy to announce that Microsoft and Ready to Run Software have released the first beta version of the Microsoft FrontPage 2002 Server Extensions (FPSE 2002) for Windows Server Code Name "Longhorn" and Windows Vista.

The beta version of FPSE 2002 can be downloaded from the following URL:

http://go.microsoft.com/fwlink/?LinkId=86544

Additional documentation about installing and using this version of FPSE 2002 can be found at the following URL:

http://go.microsoft.com/fwlink/?LinkId=88546

It should be noted that this version of FPSE 2002 is a beta release and is therefore unsupported. Also, this version of FPSE 2002 introduces no new functionality; it is essentially the same version of FPSE 2002 that was created for Windows Server 2003 that has been updated to work on Windows Server Code Name "Longhorn" and Windows Vista. That being said, this version of FPSE 2002 will enable web hosters and developers to author their web content on servers or workstations that are running IIS 7.0 on Windows Server Code Name "Longhorn" and Windows Vista.

Feedback about this release can be sent to fpbeta@rtr.com.

FrontPage Server Extensions on Vista and Longhorn

As most people that have installed IIS 7 on Windows Vista or Windows codenamed "Longhorn" have realized, there are no options to install the FrontPage Server Extensions, leaving the only possibly way to edit your web site that is hosted on a Vista/Longhorn computer is to edit the web site locally using the file system, or to use FTP to upload your files to a remote Vista/Longhorn computer.

The FrontPage Server Extensions (FPSE) 2002 are part of the Office XP system of products. The Office XP system, including FPSE 2002, left mainstream support on July 11th, 2005, according to the Office lifecycle policy. At that time, the FrontPage Server Extensions were removed from the Microsoft Download Center. Office policy is to remove software from the Download Center that is no longer supported. This policy allows us to focus our support efforts on the latest technologies. FPSE 2002 continues to be available on Windows Server 2003 in the Add Windows Components section of the Add/Remove Programs control panel.

FPSE 2002 will continue to be supported by security updates through the end of the extended support period, and all existing security content will remain available. For more information on the support lifecycle policy, see the Microsoft Lifecycle web page at the following URL:

http://support.microsoft.com/?pr=lifecycle

Because Microsoft realizes that the FrontPage Server Extensions are essential to many web hosting companies, the Internet Information Services product team is researching the development of an updated version of FPSE 2002 that will work with Microsoft Windows codenamed "Longhorn" and Microsoft Windows Vista.

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

Determining Access Column Types for FrontPage Database Results Fields

Summary

Sometimes you want to know where the database column types values are obtained when looking at the database results auto-generated code, but there is no easy way of determining that information by looking at the database results code. This is because the database column types are defined as field types in the database definition. This blog lists those definitions.


More Information

There are two different places where the column/field types will be listed:

  • In the ASP code = fp_sColTypes
  • In the WEBBOT code = s-columntypes

Below is a list of the column/field types in an Access database:

Data Type Value
AutoNumber - Long Integer  3
AutoNumber - Replication ID  72
Text  202
Memo  203
Number - Byte  17
Number - Integer  2
Number - Long Integer  3
Number - Single  4
Number - Double  5
Number - Replication ID  72
Number - Decimal  131
Date/Time  135
Currency - General Number  6
Currency - Currency  6
Currency - Euro  6
Currency - Fixed  6
Currency - Standard  6
Currency - Percent  6
Currency - Scientific  6
Yes/No - True/False  11
Yes/No - Yes/No  11
Yes/No - On/Off  11
OLE Object  205
Hyperlink  203

References

For more information on database field types, see the following Microsoft KB article:

This article contains the following section of code that lists several database column/field types:

* DEFINEs for field types - provided for reference only.

#DEFINE ADEMPTY 0
#DEFINE ADTINYINT 16
#DEFINE ADSMALLINT 2
#DEFINE ADINTEGER 3
#DEFINE ADBIGINT 20
#DEFINE ADUNSIGNEDTINYINT 17
#DEFINE ADUNSIGNEDSMALLINT 18
#DEFINE ADUNSIGNEDINT 19
#DEFINE ADUNSIGNEDBIGINT 21
#DEFINE ADSINGLE 4
#DEFINE ADDOUBLE 5
#DEFINE ADCURRENCY 6
#DEFINE ADDECIMAL 14
#DEFINE ADNUMERIC 131
#DEFINE ADBOOLEAN 11
#DEFINE ADERROR 10
#DEFINE ADUSERDEFINED 132
#DEFINE ADVARIANT 12
#DEFINE ADIDISPATCH 9
#DEFINE ADIUNKNOWN 13
#DEFINE ADGUID 72
#DEFINE ADDATE 7
#DEFINE ADDBDATE 133
#DEFINE ADDBTIME 134
#DEFINE ADDBTIMESTAMP 135
#DEFINE ADBSTR 8
#DEFINE ADCHAR 129
#DEFINE ADVARCHAR 200
#DEFINE ADLONGVARCHAR 201
#DEFINE ADWCHAR 130
#DEFINE ADVARWCHAR 202
#DEFINE ADLONGVARWCHAR 203
#DEFINE ADBINARY 128
#DEFINE ADVARBINARY 204
#DEFINE ADLONGVARBINARY 205
#DEFINE ADCHAPTER 136

Programmatically Enumerating Installations of the FrontPage Server Extensions

I had a great question from a customer the other day: "How do you programmatically enumerate how many web sites on a server have the FrontPage Server Extensions installed?" Of course, that's one of those questions that sounds so simple at first, and then you start to think about how to actually go about it and it gets a little more complicated.

The first thought that came to mind was to just look for all the "W3SVCnnnn" subfolders that are located in the "%ALLUSERSPROFILE%\Application Data\Microsoft\Web Server Extensions\50" folder. (These folders contain the "ROLES.INI" files for each installation.) The trouble with this solution is that some folders and files do not get cleaned up when the server extensions are uninstalled, so you'd get erroneous results.

The next thought that came to mind was to check the registry, because each installation of the server extensions will create a string value and subkey named "Port /LM/W3SVC/nnnn:" under the "[HKLM\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\Ports]" key. Enumerating these keys will give you the list of web sites that have the server extensions or SharePoint installed. The string values that are located under the subkey contain some additional useful information, so I thought that as long as I was enumerating the keys, I might as well enumerate those values.

The resulting script is listed below, and when run it will create a log file that lists all of the web sites that have the server extensions or SharePoint installed on the server that is specified by the "strComputer" constant.

Option Explicit

Const strComputer = "localhost"

Dim objFSO, objFile
Dim objRegistry
Dim strRootKeyPath, strSubKeyPath, strValue
Dim arrRootValueTypes, arrRootValueNames
Dim arrSubValueTypes, arrSubValueNames
Dim intLoopA, intLoopB

Const HKEY_LOCAL_MACHINE = &H80000002
Const REG_SZ = 1

strRootKeyPath = "Software\Microsoft\" & _
  "Shared Tools\Web Server Extensions\Ports"

Set objFSO = WScript.CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.CreateTextFile("ServerExtensions.Log")

objFile.WriteLine String(40,"-")
objFile.WriteLine "Report for server: " & UCase(strComputer)
objFile.WriteLine String(40,"-")

Set objRegistry = GetObject(_
  "winmgmts:{impersonationLevel=impersonate}!\\" & _
  strComputer & "\root\default:StdRegProv")
objRegistry.EnumValues HKEY_LOCAL_MACHINE, strRootKeyPath, _
  arrRootValueNames, arrRootValueTypes

For intLoopA = 0 To UBound(arrRootValueTypes)
  If arrRootValueTypes(intLoopA) = REG_SZ Then
    objFile.WriteLine arrRootValueNames(intLoopA)
    strSubKeyPath = strRootKeyPath & _
      "\" & arrRootValueNames(intLoopA)
    objRegistry.EnumValues HKEY_LOCAL_MACHINE, _
      strSubKeyPath, arrSubValueNames, arrSubValueTypes
    For intLoopB = 0 To UBound(arrSubValueTypes)
      If arrSubValueTypes(intLoopB) = REG_SZ Then
        objRegistry.GetStringValue HKEY_LOCAL_MACHINE, _
          strSubKeyPath, arrSubValueNames(intLoopB), strValue
        objFile.WriteLine vbTab & _
          arrSubValueNames(intLoopB) & "=" & strValue
      End If
    Next
    objFile.WriteLine String(40,"-")
  End If
Next

objFile.Close

The script should be fairly easy to understand, and you can customize it to suit your needs. For example, you could change the "strComputer" constant to a string array and loop through an array of servers.

Note: More information about the WMI objects used in the script can be found on the following pages:

Hope this helps!

FrontPage Versions and Timeline

November, 1995 - Vermeer FrontPage 1.0
(Version 1.0)



Mini Review: Believe it or not, FrontPage 1.0 ran on Windows 3.x and Windows NT 3.5.1. This required installing a Win32 subsystem for Windows 3.x, which was fraught with installation errors.

This version was very limited, and it didn't even support tables. The program also had a nasty little issue - if this version saw some HTML that it didn't like, it just deleted it!

 

June, 1996 - Microsoft FrontPage 1.1
(Version 1.1)

Mini Review: FrontPage 1.1 was Microsoft's first release for the FrontPage family of products. It thankfully supported tables, and it supported frames, even though Microsoft's version of Internet Explorer at the time did not support frames.

 

October, 1996 - Microsoft FrontPage 97
(Version 2)

Mini Review: FrontPage 97 dropped the need for the _vti_shm folder and started inserting FrontPage bot code into the HTML. (This was an important update.)

 

January, 1997 - Microsoft FrontPage 1.0 for Macintosh
(Version 2)

Mini Review: Microsoft FrontPage 1.0 for Macintosh was basically a port of FrontPage 97 for Apple computers. This didn't do all that well in the Apple market because FrontPage faced a deeply entrenched customer base of Apple users that were already using Adobe's products, and subsequently it was the only version of FrontPage that Microsoft created for the Macintosh.

 

September, 1997 - Microsoft FrontPage Express 2.0

Mini Review: This was a version of FrontPage that shipped with Internet Explorer 4.0; it was essentially an editor-only version of FrontPage; all of the web management features were removed. Microsoft did not make another version of FrontPage Express.

 

December, 1997 - Microsoft FrontPage 98
(Version 3)

Mini Review: This was the last version of FrontPage that featured a separate editor and explorer, but it was arguably a very popular version and it signaled the beginning of FrontPage's short-lived reign as one of the most-used HTML authoring tools.

 

March, 1999 - Microsoft FrontPage 2000
(Version 4)

Mini Review: This was the first version of FrontPage that integrated the editor and web management features, which was a huge milestone. This was also an extremely popular version, and it continued FrontPage's short-lived reign as one of the most-used HTML authoring tools.

 

June, 2001 - Microsoft FrontPage 2002
(Version 5 [Office 10])

Mini Review: This version marked the beginning of FrontPage's demise as one of the most-used HTML authoring tools. Tools like Dreamweaver began to seriously eat away at FrontPage's customer base as Dreamweaver and other tools became more powerful and developer-friendly, while FrontPage suffered from an identity crisis by sticking to simpler, novice-friendly authoring that alienated web developers.

 

October, 2003 - Microsoft Office FrontPage 2003
(Version 6 [ Office 11])

Mini Review: On a sad note, this was the last of the FrontPage family of products - Microsoft dropped FrontPage in favor of Expression Web. FrontPage 2003 is still my all-time-favorite version of FrontPage; there's a great balance of powerful functionality and ease-of-use. (Note: Several years later, Microsoft cancelled the Expression Web family, thereby ending this line of products from Microsoft.)