A significant advantage of FrontPage 2003 ($) and SharePoint Designer 2007 (free) (if you have one of them installed) are their ability to access a document through VBA.
You can do the same thing by loading the web page into a WebBrowser control
and accessing the HtmlDocument
class through the Document
property.
I cannot find my VBA code that does exactly what you want, but I did find the following procedure that may help.
Option Explicit
Sub GatherFieldNames()
Dim tag As FrontPageEditor.IHTMLElement
Dim i As Long
Dim sDoc As String
sDoc = vbNullString
For i = 0 To ActiveDocument.all.Length - 1
Set tag = ActiveDocument.all.Item(i)
Select Case LCase$(tag.tagName)
Case "form"
Case "input", "select", "textarea"
'sDoc = sDoc & Trim$(tag.Name) & vbCrLf
'or
sDoc = sDoc & Trim$(tag.getAttribute("name")) & vbCrLf
Case "option"
'included with select
Case "table", "tbody", "tr", "td"
Case "b", "font"
Case "br", "p", "div", "hr", "span"
Case "a", "img"
Case "html", "head", "meta", "body", "script", "title", "link"
Case "h1", "h2", "h3", "h4", "h5", "h6"
Case "strong"
Case "webbot"
Case Else
Debug.Print tag.tagName
End Select
Next i
End Sub