Re: Read path from text file to process directory structure
- From: "Dave Lett" <davelett@xxxxxxxxxxxxx>
- Date: Tue, 9 May 2006 07:58:50 -0400
Hi,
Before I jump in with both feet and offer a solution, can you answer a
couple of questions?
You write that you can make changes to a single directory, but that your
directory structure is nest with 2 levels of subdirectory.
Does that mean that your single directory has 2 SUBFOLDERS?
Or, did you mean what you wrote that you have a single Directory with 2
levels of subdirectory (i.e., Folders containing subfolders)?
Dave
"newschapmj1" <newschapmj1@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:F14F5290-507B-4647-98A8-514E97AC5A35@xxxxxxxxxxxxxxxx
I need to process about 10K of Word templates and make a simple change
(changing the path in a mail merge document)
I can make the changes to a single directory at the moment.
The directory structure is nested with 2 levels of subdirectory.
One idea was to generate a text file containing the full path of each
document
and then use this to process all the files.
I've not been able to find examples on this yet.
An alternative was to find code that could cope with 2 levels of
subdirectory
I'm using Word 2002
I found the following but there is work involved to get it to work with
subdirectories to 2 levels
=====================
Dave Lett 2/17/2006 10:15 AM PST
Hi Jim,
Have a look at the article "How to get the names of all the folders in the
folder tree, starting from a specified folder" at
http://word.mvps.org/faqs/macrosvba/ReadFoldersIntoArray.htm.
You can probably nest your routine inside this one.
Then, to access each file in that folder, have a look at the article "How
to
read the filenames of all the files in a directory into an array" at
http://word.mvps.org/faqs/macrosvba/ReadFilesIntoArray.htm
HTH,
Dave
.
- Follow-Ups:
- Re: Read path from text file to process directory structure
- From: newschapmj1
- Re: Read path from text file to process directory structure
- Prev by Date: Re: Macro will not stop at the bottom off the page.
- Next by Date: Re: Read path from text file to process directory structure
- Previous by thread: Re: vb Yes No message box
- Next by thread: Re: Read path from text file to process directory structure
- Index(es):
Relevant Pages
|