I'm trying to automate the uploading of files to a SharePoint document library. I've run across countless posts (on this forum and others) but can't seem to get something that works. I'm not really a developer, though I have done some simple VBA and VB Script.
What I'm looking for is a solution to automatically upload a file (.xlsx and .zip types specifically) from a local machine to a specific SharePoint document library (let's use "…/sharepoint/Metrics/Forms/AllItems.aspx" as the list) using VBA or VB Script.
In researching the issue, here are some other thoughts/comments that hopefully will help someone in providing me a solution:
- I cannot change anything on the SharePoint server
- I need to be able to pass credentials when uploading the file
- I am only looking for VBA/VBS solutions (no C# or .NET)
- I might need to set metadata when uploading
Thank you in advance for any help.
Best Answer
The following VBScript uploads a file using FrontPage RPC:
Please note that the file name should consist of ASCII characters only. Otherwise, the above script will not work.