+ Reply to Thread
Results 1 to 4 of 4

Copy from Word into Excel, with each section on separate row

  1. #1
    Registered User
    Join Date
    01-12-2011
    Location
    Virginia
    MS-Off Ver
    MS Office 2016
    Posts
    11

    Copy from Word into Excel, with each section on separate row

    - I have a Word 2016 document consisting of sections and subsections, marked as 'Heading 1' and 'Heading 2', respectively. Each section has 1-3 short paragraphs.
    - I want to copy the document into a 2-column table in Excel (2016). Column 'A' lists the section titles (all 'Heading 1' and 'Heading 2' fields), and the content from each of these sections will be copied into the adjacent cell in Column 'B'.
    - The VBA code below works perfectly (from the Word document) to open a new Excel document and then create Column 'A', listing the section titles ('Heading 1' and 'Heading 2').

    Can you please help me adapt this code so that after copying each section title/Heading into Column 'A', the content in that section is copied into the adjacent cell in Column 'B'?

    Many thanks in advance for your time and guidance.
    Please Login or Register  to view this content.
    Last edited by svenn; 02-08-2020 at 04:10 PM.

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Copy from Word into Excel, with each section on separate row

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)

    In addition, it will easier to modify the macro if we had a short sample of your data
    - Battle without fear gives no glory - Just try

  3. #3
    Registered User
    Join Date
    01-12-2011
    Location
    Virginia
    MS-Off Ver
    MS Office 2016
    Posts
    11

    Re: Copy from Word into Excel, with each section on separate row

    This, I discovered, is straightforward. The below code does what I need. There were some additional elements of my final solution that I was also looking into. But this is all that is needed at a basic level.

    Thanks and Regards.

    Please Login or Register  to view this content.

  4. #4
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,443

    Re: Copy from Word into Excel, with each section on separate row

    Administrative note

    Still using XL2003 as indicated in your profile?
    If not,perhaps update your profile as necessary to properly reflect the exact version(s) of Excel your question relates to? Members tailor answers based on your Excel version.
    Thanks

+ 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. *** Copy sub section total value to main section***
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-13-2016, 03:14 AM
  2. Linking Excel cell to specific section in Word using macro
    By TEngineer1 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-07-2015, 11:30 AM
  3. Replies: 5
    Last Post: 07-31-2013, 08:21 AM
  4. Does Excel have Section breaks like Word
    By gewoodfo in forum Excel General
    Replies: 1
    Last Post: 01-13-2010, 01:18 PM
  5. Linking an Excel cell to section of a Word Document
    By CharlesEric in forum Excel General
    Replies: 4
    Last Post: 08-14-2009, 02:53 PM
  6. Excel section in a word document
    By jase in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-25-2005, 08:05 AM
  7. Replies: 1
    Last Post: 04-27-2005, 06:06 PM

Tags for this Thread

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