p2p.wrox.com Forums

Need to download code?

View our list of code downloads.

  Return to Index  

vba_word thread: filesystemobject

Message #1 by dtudose@y... on Sun, 16 Jun 2002 15:03:12
Use absolute path of the file or set BaseFolder of fs object to your 
current directory.

If fs.FileExists("C:\myfile.doc") Then
    'It works ...!

> set fs=createobject("scripting.filesystemobject")
i> f fs.fileexists(myfile.doc) then
 >   'do something
e> nd if

> though the file exists in the default folder , the code never executes 
t> he 'do smth

> why?

  Return to Index