+ Reply to Thread
Results 1 to 1 of 1

Macro needed to copy tables and words from excel to word document

  1. #1
    Registered User
    Join Date
    11-30-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2007
    Posts
    10

    Macro needed to copy tables and words from excel to word document

    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
    Attached Files Attached Files
    Last edited by abdulgafoor2007; 10-18-2012 at 11:38 AM. Reason: For better Clarity

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1