Change defined text in all docs in a directory and then saving

A

andrewstanton

Good afternoon,

I have a directory that contains close to 950 word documents. Each one
has the name of a one staff member in the rely too field. That staff
member has left and the name must be replaced with a new name.

This is an exercise I will only have to complete once as the system
that uses these letters is being retired soon.

However, can anyone advise a programatical way to open each doc in the
directory and all subdirectories and replace the name of the employee
who has left with that of the replacement. The only alternative I can
see is to open each doc, change manually and resave.....

Many many thanks
 
H

Helmut Weber

Hi,

I guess, this is one of the most often asked questions,
and there are all kinds of sophisticated solutions,
which I don't like too much,
as things can be so simple.

C:\>dir *.doc > c:\testdir.txt /s /b

Writes a list of all files "*.doc",
in all directories and subdirectories
to "c:\testdir.txt"

Once you got the list, the rest is plain sailing.

More or less...

--
Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
 
H

Helmut Weber

Hi,

I am very sorry,
I didn't realize that this was the beginners' group.
Maybe somebody else will jump in,
given, that with
C:\>dir *.doc > c:\testdir.txt /s /b

you have a list of all the filesnames including path.

Dear friends, please take over,
I don't have the time right now,
to explain all.

--
Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
 

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