The following code creates a new word document. I have 2 lots of data from Excel that I need to put on the word document so I thought best solution would be to copy and paste. The code should take the first lot of cells I want to copy and put these on the document, then insert a page break, copy the second lot of cells and then put these on the new page.
What actually happens is it overwrites the original paste!
Any idea's?
Nick
What actually happens is it overwrites the original paste!
Code:
Dim wdApp As Word.Application
Dim wdDoc As Word.Document
Set wdApp = CreateObject("Word.Application")
Set wdDoc = wdApp.Documents.Add
wdApp.Visible = True
Range("a1:a2").Copy
With wdDoc
Range("a1:a2").Copy
.Content.Paste
.Content.InsertParagraphAfter
.Content.InsertAfter ("")
Range("a3:a4").Copy
.Content.Paste
End With
Any idea's?
Nick