Dear All,
Can one of you please help me in identifying the issue? I want to replace all <br> tags with <br><p></p> tags in a htm file. I used below code. It seems to work for .txt files but not for .htm

Any help is highly appreciated.

Sub try4()
Dim vFF As Integer, TempStr As String
vFF = FreeFile
Open "C:\Temp\Sample.htm" For Binary As vFF


TempStr = Space$(LOF(vFF))
Get #vFF, , TempStr
Close vFF
TempStr = Replace(TempStr, "<br>", "<p></p>")
Open "C:\Temp\Sample.htm" For Output As vFF
Print #vFF, TempStr
Close vFF


End Sub