+ Reply to Thread
Results 1 to 5 of 5

Convert multiple word files to one excel table

  1. #1
    Registered User
    Join Date
    09-11-2006
    Posts
    1

    Convert multiple word files to one excel table

    Hey there,

    I am kinda lost. I got a bunch of word documents (appx. 300(!)) and i need to get them into one excel file. I could do it manually, but I am sure, that there is an easier way.

    If you look at the word docs, you'll see that they are kind of unprofessional, but I can't change it. I really only need the table from the word file, BUT the I also need the date.
    And that's the tricky part, because the date and timestamp can be either taken from the file name itself or from the 'unprofessional' header.
    So, is there a chance to get all the lines from the files automatically copied into one excel table and add a field with the file name (original word doc) behind each line?

    All files will be saved in one folder.
    If anyone have an idea, how i could solve my problem, I would save me hours of manual work. That would we awesome!!

    Thanks a lot!!!!
    Cheers,
    Phil
    Last edited by Barefaced; 05-22-2007 at 03:42 PM.

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,966
    I hope that the attached is something code to what you need. It works by driving Word from Excel and sequentially opens the files listed in the first column of sheet 1. The macro makes a reference to the Word Object library.

    You can find a macro to generate all the file names in a folder on my download page (see below).

    Please get back to me if the format isn't as you need it - I took a guess from the details supplied.
    Attached Files Attached Files
    Martin

    If my solution has saved you time and/or money, please consider sponsoring my run in the 2020 London Marathon in aid of Cancer Research UK.

    https://uk.virginmoneygiving.com/MartinRice

  3. #3
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628
    Open a word document, choose 'Alt' + 'F11' to open VB editor, paste the code and change myPath:

    Please Login or Register  to view this content.
    Then execute macro.

    I hope it's what you need.

    Regards,
    Antonio

  4. #4
    Registered User
    Join Date
    07-16-2014
    Location
    Ankara
    MS-Off Ver
    2010
    Posts
    1

    Re: Convert multiple word files to one excel table

    Hi,

    I don't have any idea about macro but I have to convert about 11000 Word files into excel files. This code really worked well thank you I'm grateful Antonio. However, I also need to add a column which includes the file name of these Word documents before or next to each table. Is there any way to do that can ? It's really an emergency situation for my job.

    Thank you

  5. #5
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    2013 on Win10 (desktop), 2007 on Win10 (notebook)
    Posts
    8,033

    Re: Convert multiple word files to one excel table

    Hi, MEY8687

    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

+ 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