Hi All,
I am attempting to copy of specific range of cells from Excel into a Word document using VBA. As the extract is being used in bid documentation I would like to copy these cells as a picture.
I have had partial success using the below, but it copies only the screen, rather than the entire cell range:
Sub PasteToWord()
Dim wdApp As Object
Dim wd As Object
On Error Resume Next
Set wdApp = GetObject(, "Word.Application")
If Err.Number <> 0 Then
Set wdApp = CreateObject("Word.Application")
End If
On Error GoTo 0
Set wd = wdApp.Documents.Open("C:\Bid\Biddocs\test.docx")
wdApp.Visible = True
Range("A1:k80").CopyPicture
wd.Range.Paste
End Sub
Can anybody please help with how I might amend this so that the entire cell range rather than the visible screen is copied.
Many thanks!!!!
I am attempting to copy of specific range of cells from Excel into a Word document using VBA. As the extract is being used in bid documentation I would like to copy these cells as a picture.
I have had partial success using the below, but it copies only the screen, rather than the entire cell range:
Sub PasteToWord()
Dim wdApp As Object
Dim wd As Object
On Error Resume Next
Set wdApp = GetObject(, "Word.Application")
If Err.Number <> 0 Then
Set wdApp = CreateObject("Word.Application")
End If
On Error GoTo 0
Set wd = wdApp.Documents.Open("C:\Bid\Biddocs\test.docx")
wdApp.Visible = True
Range("A1:k80").CopyPicture
wd.Range.Paste
End Sub
Can anybody please help with how I might amend this so that the entire cell range rather than the visible screen is copied.
Many thanks!!!!