hi there
i use this code to copy a file from a source folder to the destination folder.
Code:
Dim myfolder$, myfoldertarget
myfolder = "C:\source\"
myfoldertarget = "c:\target\"
Dim fs As Object
Set fs = CreateObject("scripting.filesystemobject")
fs.CopyFile (myfolder) & [Mylistbox], [myfoldertarget] & Left([Mylistbox], Len([Mylistbox]) - 4) & Format(now, "DD-MM-YYYY") & ".doc", True
[Mylistbox] is a list in the form where the file name apears.
for example if the filename in the "mylistbox" is test
after the copy the file must be "test10-01-2006.doc" in the c:\target\ folder.
the problem is that after the copy i need an openfile command to execute the new filename.Something like openifle test10-01-2006.doc. but for the file that the last command has create and only for that file.
please help me
thanx...