Hi I need to export data from word to excel.
I Already created macro but I need to extent it:
-It now only takes data from range A1:A10, but it needs to copy all data that is availlable in column A
-It needs to print the word doc.
Much Appreciated and nice weekend!
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("h:\test.docx")
wdApp.Visible = True
Range("A1:A10").CopyPicture xlScreen, xlPicture
wd.Range.Paste
End Sub
Bookmarks