+ Reply to Thread
Results 1 to 4 of 4

open folder and copy all contents into word file

  1. #1
    Registered User
    Join Date
    02-22-2013
    Location
    saudi
    MS-Off Ver
    Excel 2003
    Posts
    35

    open folder and copy all contents into word file

    Dear all

    i have one folder that contains 40 notepad files , i would like to have a macro that will create new word first , add title for first notepad file and below the title copy all contents of this notepad , then in same word file , add the second title for second file then add the contents and so on, so t the end i have one word document and the data of all 40 notepad files are inserted under the name of the notepad file.
    how can we achieve that ?
    knowing that the names of notepad files are random.
    thanks in advance

  2. #2
    Registered User
    Join Date
    02-22-2013
    Location
    saudi
    MS-Off Ver
    Excel 2003
    Posts
    35

    Re: open folder and copy all contents into word file

    for example , folder location is : C:\VBA test
    and files inside are called : xxx.txt , yyy.docx , zzz.txt ( in case some files are word files , does it make any difference) ?
    however i wish the script does not require that we know the files names.
    Last edited by is2_egypt; 11-30-2015 at 10:07 AM.

  3. #3
    Registered User
    Join Date
    02-22-2013
    Location
    saudi
    MS-Off Ver
    Excel 2003
    Posts
    35

    Re: open folder and copy all contents into word file

    any support please ?

  4. #4
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: open folder and copy all contents into word file

    Give this a try:

    Please Login or Register  to view this content.
    Last edited by Arkadi; 11-30-2015 at 04:04 PM.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

+ 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. [SOLVED] Open word file from userform with folder and file names as per textbox values
    By KK1234 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-14-2015, 03:57 PM
  2. Marco to Open all contents (.xlsm) in a folder and search each file for a word
    By Mr.Post in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-11-2014, 04:08 PM
  3. Open each file in a folder and test and copy certain rows
    By jungjiyungg in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-29-2014, 09:43 AM
  4. How can I open a file with a vba script and copy the contents out?
    By Hyflex in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-11-2013, 02:11 AM
  5. [SOLVED] Open specific folder, select file to open and copy then paste
    By Kranky in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-22-2012, 12:14 AM
  6. Open file in folder and copy data to another file
    By Sharp in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-25-2008, 08:21 AM
  7. Replies: 7
    Last Post: 04-15-2006, 04:20 PM

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