FileExists problems

A

a.corrieri

Hi

from my understanding and examples on the web an in this forum the
followinsnipplet should work, but the test always fails, the documents exists
however, as proven by the .Open statement.

Dim fso
Dim file As String
Dim vTryDocuments() As Variant
vTryDocuments =
Array("http://eda-sp-1/sites/AFV/Shared Documents/Timelines/Study_TL.vsd", _

"http://eda-sp-1/sites/AFV/Shared Documents/Timelines/AFV_Exp_Meeting_09_2005.vsd")

Set fso = CreateObject("Scripting.FileSystemObject")
For k = 0 To UBound(vTryDocuments)
file = vTryDocuments(k)
Debug.Print file
If Not fso.FileExists(file) Then
MsgBox file & " was not located.", vbInformation, "File Not
Found" 'thats where I always drop to
Else
MsgBox file & " has been located.", vbInformation, "File Found"
End If
Application.Documents.Open (file) ' the files open here perfect
Next k
 
A

a.corrieri

yes it works with a pathname that is pointing to a physical drive, but my
files are all on a sharepoint site!
 
A

Al Edlund

have you considered examining the v2003 sdk for document checkout? It's
under integration in the library.
al
 
A

a.corrieri

yes I looked into this, however that method

CanCheckOut(strDocCheckOut)

is only half the solution, if a document isn't there ist reports false!
That's fine, but if a documents is checked out, it also reports false (what
it is supposed to do :) but for me, I don't know if the document exists or is
just unavailable for the moment. I still could open a checked out file, it
just isn't up to date (which is fine for me)
My only concern is, that currently I cannot check if a file exists. If that
happens my code breaks if I try to simply open the file :(

Is there still another way??

thanks
Alex
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top