IHTMLFrontPageBotElement Object
Represents a component in Microsoft FrontPage. See also the FPHTMLFrontPageBotElement and IHTMLFrontPageBotElement2 objects.
Using the IHTMLFrontPageBotElement object
FrontPage provides the ability to get, remove, and set attributes for FrontPage components. The following example illustrate accessing the getBotAttribute, removeBotAttribute, and setBotAttribute methods.
Private Sub AccessBots()
Dim objFPBot As IHTMLFrontPageBotElement
Dim objBody As FPHTMLBody
Dim strBot As String
Dim objPage As PageWindow
strBot = ""
strBot = strBot & "<!— webbot bot=""Search"" s-index=""All"""
strBot = strBot & " s-fields s-text=""Search for:"""
strBot = strBot & " i-size=""20"" s-submit=""Start Search"""
strBot = strBot & " s-clear=""Reset"" s-timestampformat=""%m/%d/%y"""
strBot = strBot & " tag=""BODY"" -->"
Set objBody = ActivePageWindow.Document.body
Set objPage = ActivePageWindow
Call objBody.insertAdjacentHTML("BeforeEnd", _
strBot)
Set objFPBot = _
objPage.Document.all.tags("webbot").Item(0)
MsgBox objFPBot.getBotAttribute("s-submit")
objFPBot.setBotAttribute "s-submit", "new item"
MsgBox objFPBot.getBotAttribute("s-submit")
objFPBot.removeBotAttribute "s-submit"
MsgBox objFPBot.getBotAttribute("s-submit")
End Sub