The procedure below will paste 3 new paragraphs into the ActiveDocument.
The Collapse command moves the insertion point to the end of the inserted text. Without it the data would be overwritten each time.
Sub pasteHTML() strHTML1 = "<p>A</p>" & vbCrLf strHTML2 = "<p>B</p>" & vbCrLf strHTML3 = "<p>C</p>" & vbCrLf Set rng1 = WebDesigner.ActiveDocument. _ Selection.createRange rng1.pasteHTML (strHTML1) rng1.collapse False rng1.pasteHTML (strHTML2) rng1.collapse False rng1.pasteHTML (strHTML3) End Sub
The text will look like:
A B C
The HTMLwill look like:
<p>A</p> <p>B</p> <p>C</p>