Removes the attribute specified by the strAttributeName attribute.
expression.removeBotAttribute(strAttributeName)
expression An expression that returns a IHTMLFrontPageBotElement object.
strAttributeName Required String. The string that represents the name of the attribute.
Bool
This example uses the removeBotAttribute method to remove 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 myFPBot.getBotAttribute("s-submit")
Call myFPBot.removeBotAttribute("s-submit")
Debug.Print myFPBot.getBotAttribute("s-submit")
End Sub