Seek to open Word text files from file names list stored in Excel worksheet

505nala

New Member
Joined
Jun 12, 2013
Messages
1
I am new to writing VBA macros and trying to gain proficiency, while trying to get work accomplished at the same time .

I now use VBA to open a number of text files, one at a time in Word, complete modifications, and then resave in advance of use elsewhere. What I would like to do is further automate by having the a VBA macro retreive the text file names from a pre-existing list from an Excel file and use that data to identify and text files (in WORD).

In summary, my vision is to:

1) Have VBA identify all of the required text files in a given sub-directory and transfer those names to an EXCEL worksheet (covered).
2) Have WORD draw from the list to individually open each text file (not covered) before modifying and saving (covered), and then moving on to the next file in the list.

I haven't yet found examples to match my requirement.

Thank you in advance if you can help.
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)

Forum statistics

Threads
1,216,099
Messages
6,128,823
Members
449,470
Latest member
Subhash Chand

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top