setBotAttribute Method

       

Sets an attribute for an FPHTMLFrontPageBotElement object.

expression.setBotAttribute(strAttributeName, AttributeValue)2)

expression   An expression that returns a FPHTMLFrontPageBotElement object.

strAttributeName   Required STRING.

AttributeValue)2   Required VARIANT.

Return Type

Void

Example

This example uses the setBotAttribute method to set a search bot.

Private Sub AccessBots()
Dim myMyFPBot As FPHTMLFrontPageBotElement
Dim myBodyObject As FPHTMLBody
Dim myHTMLString As String
Dim myPage As PageWindow

myHTMLString = ""
myHTMLString = myHTMLString & _
    "<!--webbot bot=""Search"" s-index=""All"""
myHTMLString = myHTMLString & _
    " s-fields s-text=""Search for:"""
myHTMLString = myHTMLString & _
    "i-size=""20"" s-submit=""Start Search"""
myHTMLString = myHTMLString & _
    " s-clear=""Reset"" s-timestampformat=""%m/%d/%y"""
myHTMLString = myHTMLString & " tag=""BODY"" -->"

Set myBodyObject = ActivePageWindow.Document.body
Set myPage = ActivePageWindow

Call myBodyObject.insertAdjacentHTML("BeforeEnd", _
    myHTMLString)

Set myMyFPBot = _
    myPage.Document.all.tags("webbot").Item(0)

Debug.Print myMyFPBot.getBotAttribute("s-submit")
Call myMyFPBot.setBotAttribute("s-submit", "new item")
Debug.Print myMyFPBot.getBotAttribute("s-submit")
Call myMYFPBot.removeBotAttribute("s-submit")
Debug.Print myMYFPBot.getBotAttribute("s-submit")

End Sub