Your code in #1
just replaced a break with an empty paragraph, so that's what my macro did in #8TempStr = Replace(TempStr, "<br>", "<p></p>")
Your SendKeys in #9 is now replacing a break with a break+empty paragraph
Depending on what it is you really want to do, this macro will replace a break with a break+empty paragraph
The only change was changing the 'Replace With' parameter
Option Explicit Sub try6() Dim vFF As Integer, TempStr As String vFF = FreeFile Open "C:\users\userid\desktop\Sample.htm" For Binary As vFF TempStr = Space$(LOF(vFF)) Get #vFF, , TempStr Close vFF MsgBox Len(TempStr) TempStr = Replace(TempStr, "<br>", "<br><p></p>") MsgBox Len(TempStr) Open "C:\users\userid\desktop\Sample_1.htm" For Binary As vFF Put #vFF, , TempStr Close vFF End Sub




Reply With Quote
