Dear All,
I have opened an excel sheet from word. Now I want to paste a table from range (A1:D4) to a specific location. The location is where the word "ABCD" is placed. Can anybody help me to replace "ABCD" with the table copied from excel. So far the code is as below:
Sub OpenExcelWorkbook()
Dim objXLApplication As Excel.Application
Dim objXLWorkbook As Excel.Workbook
Dim wb As Document
Set objXLApplication = CreateObject("Excel.Application")
Set objXLWorkbook = objXLApplication.Workbooks.Open("C:\Documents and Settings\q759548\My Documents\TsDTA1.xlsx")
objXLApplication.Visible = True
objXLApplication.Range("A1:D4").Copy
Set wb = Documents("LB_TrialSpecificDTA_ Template.docm")
wb.Activate
End Sub
Bookmarks