Yeah, that should be fairly simple, as long as your 300+ files are in a
somewhat coherent arrangement. You have several distinct task to perform,
and none of them are particularly involved.
1. Open your warning file by hand - that's easiest.
2. In your macro, use DIR to specify a string which will locate all your
files. If they're named Mary001.doc to Mary300.doc, then "Mary???.doc" will
do it. If they have random names, but are all in one folder, then
"C:\whateverfolder\*.doc" will work. Since I don't know the specs on these
files, you'll have to set that up yourself.
3. Then run your code something like this:
*** Warning - this is not tested code - these are rough instructions ***
Documents("Warning.doc).Range.Copy
Dir "Mary???.doc"
Do
x$ = Dir
If x$ = "" Then Exit Loop
Documents.Open x$
' Move your selection to beginning, end or wherever (you didn't say
where you wanted the warning)
Selection.Paste
ActiveDocument.SaveAs Left$(x$,instr(1,x$,".")-1) + "Done.doc" '
Assuming all your stuff has the ext. of doc
ActiveDocument.Close
Loop
If this is something that will happen often, or other people will use, then
you will want to doll it up a little.
If it's a one-timer, this should do you just fine.
One warning: you might want to put your output into a different folder, so
you can wipe it easily if your first try doesn't produce quite what you
want. In that case, use ...SaveAs "C:\otherfolder\" + Left$(x$....
Petr
P?edmt: joining two files as one
Datum: 11. ?jna 2000 16:43
I have a repetitive task of joining a file with three hundred+ other files.
Copy and paste the first into the 300+ other files and have them save as the
file name plus the word "done".
ex. warning.doc + mary.doc becomes "maryDone.doc"
Anybody? Help!