Open multiple files and rename file with first 5 words

S

SCrowley

Back in July a post was made:
Juliann shared this with us in microsoft.public.word.docmanagement:
Is there a program or utility available that will allow me rename a
Word files based on a couple of areas within the document. For
example, there is always a RE: and always a AC#: and I need to name
the document whatever is after the RE:.whatever is after the AC#:.

Can someone point me in the right direction.

You asked for a pointer, I'll only give you a pointer.
This utility is called VBA: Visual Basic for Applications.
Write a program that does the following:

* make a list of all files in a folder
* for every file in the list:
* open the file
* look for RE: and put that in a variable
* look for AC#: and put that in a variable
* save file as (RE)_(AC#).doc
* close the file
* repeat until the list is done.

You will have to learn how to program if you don't know that yet.
Good luck!

--
Amedee Van Gasse

Amedee Van Gasse "pointed" in the right direction. I'm asking for example
code. the user has 400 files named 1.xls, 2.xls, 3.xls and I need a code that
does exactly what Amedee outlined in his suggestion. Can you share your code
with me? I'm assuming Office XP
 

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