james_halliwell
Registered User.
- Local time
- Today, 17:41
- Joined
- Feb 13, 2009
- Messages
- 211
Hi all,
i would like to copy a database from my desktop to to a sharepoint document libairy, i tried the below but it fails bad file name, im a novice at vba so could someone point me in the right direction please
i would like to copy a database from my desktop to to a sharepoint document libairy, i tried the below but it fails bad file name, im a novice at vba so could someone point me in the right direction please
Code:
Dim fs As Object
Dim oldPath As String, newPath As String
oldPath = "C:\Users\James\Desktop\abc.accdb" 'Folder file is located in
newPath = "[URL="http://abceu2.yuy.com/DPY/RegionalIntegration/Sync%20Report/"][FONT=Calibri][SIZE=3][COLOR=#0000ff]http://abceu2.yuy.com/DPY/RegionalIntegration/Sync%20Report/[/COLOR][/SIZE][/FONT][/URL]abc.accdb" 'Folder to copy file to
Set fs = CreateObject("Scripting.FileSystemObject")
fs.CopyFile oldPath, newPath Set fs = Nothing
Last edited: