+ Reply to Thread
Results 1 to 10 of 10

Copying Excel Range into existing MS Word Table

  1. #1
    Registered User
    Join Date
    07-26-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2010, 2013
    Posts
    21

    Copying Excel Range into existing MS Word Table

    Hello Everyone!


    I have a range of data on Sheet6.Range(A4:C). I need to post each cell in the Range(A4:C) to an existing Word table beginning in (C1,R5). Obviously, I need each excel row in a separate row of the Word table. Here are the parameters:

    1. The Word document is open
    2. The table is bookmarked "MyTable"
    3. The columns are bookmarked ("Folder_Number","Code","Description") in the beginning row(5).

    Thank you all for any assistance you can provide!

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Copying Excel Range into existing MS Word Table

    Hello ericv101,

    If you could post copies of both the Excel workbook and Word document, it will make it easier to code and test solutions. Most people are not inclined to recreate your work from scratch.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    07-26-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2010, 2013
    Posts
    21

    Re: Copying Excel Range into existing MS Word Table

    Hi Leith -

    I agree and apologize. Unfortunately, I cannot post the Workbook or the Word Doc as they are both sensitive and proprietary. I can add a portion of the existing Excel code:
    Please Login or Register  to view this content.
    I wish I could post both pieces as you've suggested. Again, I apologize and understand if it prohibits assistance.

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Copying Excel Range into existing MS Word Table

    Hello ericv101,

    Does this Word table need to add rows to hold the Excel data?

  5. #5
    Registered User
    Join Date
    07-26-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2010, 2013
    Posts
    21

    Re: Copying Excel Range into existing MS Word Table

    Hi Leith -

    Yes, the Word table has information in rows 1-4. This will need to begin on row 5 and continue until the excel range is complete. I've been working with this:

    Please Login or Register  to view this content.
    It seems to be pulling all the information over but not incrementing and adding next row. It's just expanding the cells in the word table. Thanks for taking a shot at it with less than all the info.

    -Eric

  6. #6
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Copying Excel Range into existing MS Word Table

    Hello ericv101,

    This should be a good start. This will add rows to the table from the Excel worksheet to the end of the Word table. I assumed that row 5 was the end of the table. Let me know what changes need to be made.
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    07-26-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2010, 2013
    Posts
    21

    Re: Copying Excel Range into existing MS Word Table

    Hi Leith -

    Thank you so much! I think it will do the trick!

    -Eric

  8. #8
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Copying Excel Range into existing MS Word Table

    Hello ericv101,

    Test it out really well just to be sure. I have some code in there to start Word if Word is already open. This will fail because there is no path for the document to be opened. The macro assumes there is only 1 document in the open Word application and it is the one you want.

  9. #9
    Registered User
    Join Date
    07-26-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2010, 2013
    Posts
    21

    Re: Copying Excel Range into existing MS Word Table

    Will do. I think I can make the mods required. Thanks again!

  10. #10
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Copying Excel Range into existing MS Word Table

    Hello Eric,

    You're welcome.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Copying from Excel to a table in Word
    By woolleyy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-14-2013, 12:39 PM
  2. [SOLVED] Copy excel range and paste special picture (metafile) into existing word dot VBA
    By Markcuss in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-06-2012, 08:21 PM
  3. Need Help in copying a Table from Word file to Excel
    By sure2005 in forum Excel General
    Replies: 1
    Last Post: 10-19-2010, 03:23 PM
  4. Copying word table formats to excel using VBA
    By mmussmann in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-30-2009, 04:26 PM
  5. Copying into excel range from word range with formatting
    By souravsain in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-07-2008, 01:53 AM

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