|
-
Jul 19th, 2005, 04:49 PM
#1
Thread Starter
New Member
checking to see if a file exists in Word... RESOLVED!
hi --
I'm attempting to write a script in Word in which the script checks a specific folder for a specifically named file. If it's not there, it then looks for the next file.
Not sure what to do here - any advice much appreciated. Thanks!
Last edited by apeface76; Jul 20th, 2005 at 08:29 AM.
-
Jul 19th, 2005, 10:10 PM
#2
Fanatic Member
Re: checking to see if a file exists in Word... help!
The easiest way I find to check for files existing without the old error trapping way is a file system object.
VB Code:
Set FSO = CreateObject("Scripting.FileSystemObject")
If FSO.FileExists(FileName) Then
'Conditions if true
Else
'Not true
End If
If someone could I'm not totally sure about the createobject, can't remember if its Scripting. or something else... usually just reference it in VB but know you can do it this way to because I had to do it once on an asp page.
-
Jul 20th, 2005, 08:28 AM
#3
Thread Starter
New Member
Re: checking to see if a file exists in Word... RESOLVED!
fantastic. thanks for the help!
-
Jul 20th, 2005, 08:30 AM
#4
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|