FileCopy with a HTTPS site

Trying to do the following:
On Error Resume Next

    Set oWSHShell = CreateObject("WScript.Shell")
    strDest = oWSHShell.SpecialFolders("Desktop") & "\AIMS\AIMS.accdb"
    Set oWSHShell = Nothing
   
   FileCopy "https://my.network.com/Sec/HS/HSCS/AIMS/AIMS Database/AIMS.accdb", strDest
   'FileCopy "\\rs\PRO1\IB\ER\Work\LABS\Databases\SA\AIMS\AIMS.accdb", strDest
    
   strOpenClient = "MSAccess.exe " & q & strDest & q
   Shell strOpenClient, vbNormalFocus
    
   DoCmd.Quit

Open in new window


The commented out FileCopy works just fine.  Just when we try to copy from the https site it doesn't do anything.  No error or anything.  It just doesn't copy.
If there another command to copy from a HTTPS site?

Thanks
John
John SheehySecurity AnalystAsked:
Who is Participating?
 
Gustav BrockConnect With a Mentor CIOCommented:
This, for example, works for me from Sharepoint:

? Downloadfile("https://companyname-my.sharepoint.com/personal/person_company_com/Documents/TestFolder/Sample.pdf", "c:\test\downloadedsample.pdf")

Open in new window

0
 
Gustav BrockCIOCommented:
You could try the DownloadFile function here:

Show pictures directly from URLs in Access forms and reports
0
 
John SheehySecurity AnalystAuthor Commented:
I will give this try and let you know.
Thanks
0
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

 
John SheehySecurity AnalystAuthor Commented:
So after reviewing how your database and forms display/download pictures I can't see how I could implement this into my use.  I am trying to copy a file from a sharepoint site to a folder on the desktop.  Then it closes and open that file up.

I am sure there is a way.  But I am not seeing it.

Thoughts?

Tahnks
John
0
 
Gustav BrockCIOCommented:
It's only the DownloadFile itself that will be of use for you. Just pass it the correct URL.
However, if login is required, it will not work. It needs direct access to the file at the URL.
0
 
John SheehySecurity AnalystAuthor Commented:
I am getting a compile error:  Expected: =

John
0
 
Gustav BrockCIOCommented:
Well, that was for the immediate window (Ctrl+G).

In code:

Result = Downloadfile("https://companyname-my.sharepoint.com/personal/person_company_com/Documents/TestFolder/Sample.pdf", "c:\test\downloadedsample.pdf")

Open in new window

0
 
John SheehySecurity AnalystAuthor Commented:
Yep, figured that out once I hit submit.  Just tested it out and it works as intended.  Great tool.
Thank you very much.
0
 
Gustav BrockCIOCommented:
You are welcome!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.