copy dtabase to sharepoint site

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


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:
You have to kind of "PUBLISH" the Access database to SharePoint rather than just copy and paste it. if you have MSA Version 2007 or above go to the File tab> Save & Publish >Save Database As : SharePoint

Read here for more information about putting a Database on Sharepoint and using the datbase after it's there.

Cheers!
Goh
 
Last edited:

Users who are viewing this thread

Back
Top Bottom