Question : What is the alternative for DIR when using VBA to call Sharepoint?

I am redesigning a few features on my Access database to be able to function in citrix.  One of those is the repointing from a share drive (local client machine) to using sharepoint mapping.  The script below worked fine from a mapped drive to determine if a file already existed, however, it generates 2 different errors now:

Me.File_Path.DefaultValue = """http://techsp/sites/techven/Shared%20Documents/Product%20Analysis%20Forms%20-%20People%27s%20Court/2010%20Product%20Analysis%20Responses/DB%20Testing/"""

filepath = me.file_path


Dim dlg As Word.Dialog
Options.DefaultFilePath(wdDocumentsPath) = filepath -->This generates error 5417...essentially that filepath is not valid.
If Dir$(filepath & pplcMonth & digyear & "_" & vndr & prodId & ".doc") = "" Then --->if I comment out the options.default command, then error Runtime Error 52, bad file name or number appears.
 doc.SaveAs (filepath & pplcMonth & digyear & "_" & vndr & prodId & ".doc")
'if it exists then prompt for save
 Else
    Set dlg = appWord.Dialogs(wdDialogFileSaveAs)
    dlg.Name = pplcMonth & digyear & "_" & vndr & prodId & ".doc"
    dlg.Show
'if not exists, then save it (not as template)
 End If

rst.MoveNext
docs.Close

What is another way I can check for existing file either from Access or from Word?

Answer : What is the alternative for DIR when using VBA to call Sharepoint?

Random Solutions  
 
programming4us programming4us