View Single Post
 
Old 08-27-2014, 08:44 AM
rpothen's Avatar
rpothen rpothen is offline Windows 7 64bit Office 2013
Novice
 
Join Date: Aug 2014
Location: Philadelphia
Posts: 1
rpothen is on a distinguished road
Default Insert Multiple files - from a list

This code (https://www.msofficeforums.com/word-...ple-files.html) is great and it get the files from a directory ( strFile = Dir(strFolder & "*.txt", vbNormal) ) all the text file in this specific folder\directory . . . great . . . can someone give me code where instead of getting the file from a directory, I want to read a text file that contains the names of the file that I want to insert into the document.

For example:
File = filenames.txt contains the following rows/data:
C:\user\rpothen\departments.txt
D:\data\regions.txt
L:\EMEA\country.txt

I want to ready Filename.txt and insert the contents of the three files into my document.

How do I do that?

Last edited by macropod; 08-27-2014 at 03:16 PM. Reason: Split post to new thread
Reply With Quote