'How to use VBA to copy the file into SharePoint shared documents library folder

I'm working on a Access DB allowing me to store files in a network location rather than as attachments in access. The code is supposed to copy file from a local drive into a network location using

FileCopy strSource, strDest

I would like to use SharePoint documents library as a target storage location. How can i provide a path to SharePoint document library folder?

I tried:

  • Providing URL of the folder "https://name.sharepoint.com/sites/SiteName/Shared Documents/"

with different variations of forward and back slashes and "%20" for space

  • Mapping SP folder a network drive is unsuccessful. I get error message:

enter image description here"

Needles to say the regular (non SharePoint) network drive address works with my code without problems.

What am I doing wrong?

Thanks for any help.



Solution 1:[1]

Try using the Sync feature in Sharepoint to a local folder on your PC. Copy files to the local location and the Sync feature will automatically upload them to your Teams Channel.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Cheeto Research