Hello,
I have following issue: I have lots of data in one sheet and I would like to print it out. I am not able to create header/footer with table (I can only insert page numbers, pictures etc.) in Excel, so I would like to transfer specific ranges from the Excel to the existing Word file. Also for example range A1:D4 should be in the first page and range E1:H4 should be in the second page in Word document.
I have tested following code to transfer selected are to a new word document:
Sub Test()
Dim objWord As Object
Set objWord = CreateObject("Word.Application")
Range("A1:D4").CopyPicture xlPrinter
With objWord
.Documents.Add
.Selection.Paste
.Visible = True
End With
End Sub
If I select both areas, same code will transfer them to the same page:
Range("A1:D4","E1:H4").CopyPicture xlPrinter
Please check the attached file, thanks.
Bookmarks