I have thousands of html files...
Do you actually have these files on-hand, or are they online?
...and need to save each of them as txt...
Any text editor should be able to save the data within (i.e. why use FireFox), and I think a straight rename of .htm or .html to .txt. will work (at least on any Windows system). Or do you mean: save just the displayed text of the HTML file?
EDIT:
First, start off with this link, which has a good explanation of how to get started with shdocvw, which you will need to do this.
Once you have the reference set up, using the functions
Function GetNewIE() As SHDocVw.InternetExplorer
and
Function LoadWebPage(i_IE As SHDocVw.InternetExplorer, i_URL As String) As Boolean
from the link (just copy into your project as described in the link) to load your individual html files, using a loop to get through each file. (Excel would be good for this, because you can put your list of files into the cells, and cycle through each cell to retrieve.) I have never done something like this with so many files, so I cannot guarantee this will work, unfortunately...
Dim IE As SHDocVw.InternetExplorer
Dim lRow as Long 'Long in case you have a LOT of files
Dim iFNum As Integer
Dim sFilePath As String
Set IE = GetNewIE
For lRow = 1 To 5000 Step 1 ' Assuming you have 5,000 html files, so 5,000 rows with the paths to each
sFilePath = ActiveSheet.Range("A" & lRow).Value ' This should also include the filepath. i.e. "C:\dir\..."
If LoadWebPage(IE, sFilePath) Then
iFNum = FreeFile(lRow)
Open sFilePath & ".txt" For Output As iFNum
Write #iFNum, IE.Document.InnerText
Close #iFNum
End If
Next lRow