I have this code in a method:
[code]Dim fPDF As folderitem
fPDF = New FolderItem(CList, FolderItem.PathTypeNative)
If fPDF <> Nil And fPDF.Exists Then
PDFFile = WebFile.Open(fPDF)
PDFFile.ForceDownload = True
If PDFFile <> Nil Then
MsgBox(“The PDF file is not available.”)
I placed a breakpoint at if fPDF… to evaluate the variables. In the case at hand, CList is “S:\TEMP\redbook 2016-2017 eng.pdf” I never get to open the webfile, because fPDF generates an error 105. invalid filename.
If I put the CList string in File Explorer, I open the target file correctly, so I know that the string is good. I can’t figure out why I am getting this error 105. It is probably something really simple, but I just cant figure it out. I tried with underscores instead of spaces in the filename, same result.
Thanks in advance.
edit: 2017 R1.1 on Windows 10