View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
et10yl et10yl is offline
external usenet poster
 
Posts: 8
Default How to copy a file into folders that are created based on a list?

I'm currently using this sub to create new folders based on an Excel that I
have:

Sub MakeFolder()
For Each Cell In Range("C1:C43")
MkDir (Cell.Text)
Next Cell
End Sub


What I'd like to do is to copy a file into each of these newly created
folders. Say for example, I want to copy C:\MyDocs\template.doc into each
and every one of these new folders, is there code I can use to do that? The
code I've found referencing such a copy an paste file function seems to
require an absolute file destination path (e.g.
C:\MyDocs\newcreatedfolder\template.doc) and I'm not quite sure how to
reference that?

Thanks in advance!