Open & modify documents in selected folder

S

StanC

I only need to get the drive letter from the user. The path to the folders
I want to operate in is known. Once I'm in the right folder I need a
For...Next (I think) to:
* open each file in the collection one at a time
* let me copy text info from the document to be pasted into a report.

I'm stuck on how to open each document individually, execute some
statements, close, then repeat for each document until all documents in
the folder have been processed.

Appreciate any help/advice.
 
J

Jonathan West

StanC said:
I only need to get the drive letter from the user. The path to the folders
I want to operate in is known. Once I'm in the right folder I need a
For...Next (I think) to:
* open each file in the collection one at a time
* let me copy text info from the document to be pasted into a report.

I'm stuck on how to open each document individually, execute some
statements, close, then repeat for each document until all documents in
the folder have been processed.

Appreciate any help/advice.


Hi Stan

This article shows you how to cycle through a folder full of files. You
would replace the find/replace code inside the loop with your copy-paste
code.

Find & ReplaceAll on a batch of documents in the same folder
http://word.mvps.org/FAQs/MacrosVBA/BatchFR.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top