K
Keith
I am trying to copoy one file to another using VBA in a module. I read the
help on the topic and saw the example for copyfile method. The example is
.....
FileSystemObject.CopyFile "c:\mydocuments\letters\*.doc", "c:\tempfolder\"
Now, when I try the code I get an "object required" error.
I've copied and pasted the two file paths, so I am confident they are
correct, and the originating file is present. What likely going on?
Below is my code, although pasting it in here, there are some line-breaks
that were generated. In the original, it's all on one line.
FileSystemObject.CopyFile "C:\Documents and
Settings\mydirectory\Copy_Test\Copy_Test_Sub_Folder_1\*.doc", "C:\Documents
and Settings\mydirectory\Copy_Test\test.doc", True
in copy_test_sub_folder_1 I also tried naming the exact file "test.doc"
Thank you.
help on the topic and saw the example for copyfile method. The example is
.....
FileSystemObject.CopyFile "c:\mydocuments\letters\*.doc", "c:\tempfolder\"
Now, when I try the code I get an "object required" error.
I've copied and pasted the two file paths, so I am confident they are
correct, and the originating file is present. What likely going on?
Below is my code, although pasting it in here, there are some line-breaks
that were generated. In the original, it's all on one line.
FileSystemObject.CopyFile "C:\Documents and
Settings\mydirectory\Copy_Test\Copy_Test_Sub_Folder_1\*.doc", "C:\Documents
and Settings\mydirectory\Copy_Test\test.doc", True
in copy_test_sub_folder_1 I also tried naming the exact file "test.doc"
Thank you.