setBotAttribute Method
Sets an attribute for a Microsoft FrontPage component.
expression.setBotAttribute(strAttributeName, AttributeValue)
expression Required. An expression that returns one of the objects in the Applies To list.
strAttributeName Required String. The string that represents the name of the attribute.
AttributeValue Required Variant. The value of the attribute specified in the strAttributeName argument.
Example
This example uses the setBotAttribute method to set a search bot.
Private Sub AccessBots()
Dim objFPBot As FPHTMLFrontPageBotElement
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