hjgoldstein
Programmer
Hi.
I am running a routine each day which saves a file in a folder with the format :
//sharepoint.xxxx.com/sites/Shared%20Documents/Reporting/Transaction%20and%20Utilisation%20Reports/yyyy-mm-dd_Filename.xlsx
where the yyyy-mm-dd is today's date.
I need to check first that the file does not exist.
I have tried using
using string variables to generate the path/filename combo
but keep getting errors.
I see that there is a "FileExists" method using a FileSystemObject (according to Ms help) and this would, I think, do the job but I can't find out more.
Any pointers would be appreciated.
Aspiring to mediocrity since 1957
I am running a routine each day which saves a file in a folder with the format :
//sharepoint.xxxx.com/sites/Shared%20Documents/Reporting/Transaction%20and%20Utilisation%20Reports/yyyy-mm-dd_Filename.xlsx
where the yyyy-mm-dd is today's date.
I need to check first that the file does not exist.
I have tried using
Code:
If Dir (path filename) <> ""
using string variables to generate the path/filename combo
Code:
Dim SptPath As String
SptPath = "[URL unfurl="true"]http://sharepoint.xxxx.com/sites/Shared%20Documents/Reporting/Transaction%20and%20Utilisation%20Reports"[/URL]
Dim SptFilename As String
SptFilename = (Format(Date, "yyyy-mm-dd") & "_Utilisations.xlsx")
Dim SptPathFilename As String
SptPathFilename = SptPath & "/" & SptFilename
I see that there is a "FileExists" method using a FileSystemObject (according to Ms help) and this would, I think, do the job but I can't find out more.
Any pointers would be appreciated.
Aspiring to mediocrity since 1957