Consulting

Results 1 to 4 of 4

Thread: Copy Paragraph Headings and Text in MS word to Excel using Excel VBA

  1. #1
    VBAX Newbie
    Joined
    Dec 2019
    Posts
    2
    Location

    Copy Paragraph Headings and Text in MS word to Excel using Excel VBA

    Copy Paragraph Headings to Excel heading and paragraph text to the Cell below the column heading using Excel VBA

    Dear All,

    I have been trying for a few days now with no luck, could not find a proper code to automate the below task. I highly Appreciate it if anyone can guide me on this.

    I have lots of word documents which I need to copy paragraph heading and the underline text into Excel. Headings to Column Headings, And other text to a single cell below the Column heading. it should be saved on the same worksheet. The paragraph heading in word are not always the same, but the Heading style is set to "Heading style 1"

    The code would ideally perform the following way

    1.Code Select the Paragraph Heading in word doc with Ms word "Heading Style 1" and check if the heading is already saved in excel worksheet as a column heading, If it is not there, add the paragraph heading to column heading in excel worksheet.

    2.Copy the entire text under each paragraph Heading in the word doc to a single cell under the matching Column Heading.

    Thank you for your consideration

  2. #2
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,874
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

  3. #3
    VBAX Newbie
    Joined
    Dec 2019
    Posts
    2
    Location
    NO But i will definitely check it

  4. #4
    Knowledge Base Approver VBAX Guru macropod's Avatar
    Joined
    Jul 2008
    Posts
    4,435
    Location
    For code to process content associated with given heading Styles, see: http://www.vbaexpress.com/forum/show...sing-excel-vba
    Cheers
    Paul Edstein
    [Fmr MS MVP - Word]

Posting Permissions

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