Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating One File from another

Status
Not open for further replies.

rdjmorgan

Programmer
Jan 31, 2002
11
0
0
GB
Hi
I have a number of folders with subfolders and files what I would like to do is create a duplicate set of folders, subfolders and files but each filename will be different (the will have a prefix to the filename and the file type will change to .doc).

For Example:

I currently have :
Drive1
Folder One
SubFolder One
Filename One.txt

I would like
Drive2
Folder One
SubFolder One
F0xxxx Filename One.doc

Can anyone help with some vba code that might do this in MS Word?

Many thanks

Jay
 
hi,

Check out the Name x As y statement.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
You may get away with renaming text file into doc file, Word may be OK with it, but what about if you have files like:

One.pdf
Two.xls
Three.jpg
Four.dgn

Do you want to have them as:

F0xxxx One.doc
F0xxxx Two.doc
F0xxxx Three.doc
F0xxxx Four.doc

???

Have fun.

---- Andy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top