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
ath) = 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
Set dlg = appWord.Dialogs(wdDialogFi
dlg.Name = pplcMonth & digyear & "_" & vndr & prodId & ".doc"
'if not exists, then save it (not as template)
What is another way I can check for existing file either from Access or from Word?