Oh, I see. In order to do that' you need to get the text from the file into a string, here's how you can load from and save to a string. Both bits of code assume that sString is declared someplace else.
By the way, if any of you are wondering why there's a semicolon at the end of one of the lines in the saving code, it's so the Print statement doesn't stick a newline at the end of the file.VB Code:
'Loading the text from the file Dim FileNum As Long FileNum = FreeFile Open "c:\test.htm" For Input As FileNum sString = Input(LOF(FileNum), FileNum) Close FileNum 'Saving the text to the file Dim FileNum As Long FileNum = FreeFile Open "c:\test.htm" For Output As FileNum Print #FileNum, sString; Close FileNum
I can post some code to strip off all the tags, but I don't see how it'd be useful. Do you know about the string manipulation functions VB provides? Basically, you gotta get creative with those.
I'll put together some code to strip off the tags right now, just as an example...




Reply With Quote