Does the FileCopy function only accept local filesystem?

Z

Zark3

Dear all,

In an excel macro I want to use the FileCopy function to copy a file,
but it bails out saying error# 52 invalid file name or number
(translated from local message). My suspicion is that FileCopy does
not accept https links, is that correct?

Code sample:
Dim sSharepointSite: sSharepointSite = Cells(rBuCell.Row + 1,
rBuCell.Column).Value
Dim sSharepointUrl: sSharepointUrl = "https://portal.
[mysite].com/finrap/" & sSharepointSite & "/Gedeelde%20documenten/" &
sPeriodLabel & "/"
If Len(Dir(sPathTelefoon)) > 0 Then MsgBox sSharepointUrl &
Dir(sPathTelefoon)
If Len(Dir(sPathTelefoon)) > 0 Then Call
FileCopy(sPathTelefoon, sSharepointUrl & Dir(sPathTelefoon))

sSharepointUrl is constructed accurately as is sPathTelefoon (reading
from the msgbox)...

Thanks for any tips,
Chris
 
Z

Zark3

Does anybody maybe have an alternative suggestion? What I'm trying to
do is 1) open an excel file, 2) run a plugin to update the data, 3)
use adobe pdfdistiller to save to pdf on a network share and 4) batch
copy all pdf'ed reports to sharepoint (different subsites for each
bu). If FileCopy is not the preferred way to go, I'd gladly accept
anything that works :)

Chris
 

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