Hometowncc
asked on
Use VBA from Access 2003 to create files/folders in SharePoiint 2007
We have a core application written in Access 2003/VBA using SQL 2005 as the backend.
As part of the app, we have facilities for uploading/editing/deleting files to MS file system.
We've been migrating all files to MOSS7 (SharePoint 2007 Portal), and now we're moving the files managed by the application.
We still need to manage them from the current Access application, so we need to modify our code that currently uses CreateObject("Scripting.Fi leSystemOb ject") functions and methods (e.g. CreateFolder, FileExists, BuildPath, CopyFile) to manage web hyperlinks pointing to the SharePoint server.
What is the best method to do this, and can anyone point me to VBA code that illustrates creating a folder, creating a file, opening a file, etc. in SharePoint from Access?
As part of the app, we have facilities for uploading/editing/deleting
We've been migrating all files to MOSS7 (SharePoint 2007 Portal), and now we're moving the files managed by the application.
We still need to manage them from the current Access application, so we need to modify our code that currently uses CreateObject("Scripting.Fi
What is the best method to do this, and can anyone point me to VBA code that illustrates creating a folder, creating a file, opening a file, etc. in SharePoint from Access?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Ah, but that is my point, try to access the file like this: "\\www.test.com\test folder\test.doc"
Forced accept.
Computer101
EE Admin
Computer101
EE Admin
ASKER
...
Dim fs
Dim fsFolder
Set fs = CreateObject("Scripting.Fi
...
strtoUrl = "http://www.test.com/test_folder/test.doc"
Application.FollowHyperlin
...
but the other functions - which are critical - don't work:
...
if fs.folderexists(strtoFolde
...
else 'folder does not exist - create it
set fsfolder = createfolder(strFolderToCr
endif
...
if fs.fileexists(strFile) then 'check if file should be overwritten or skipped
...
else
fs.copyfile(strFile, strDestinationFile)
...
endif
-------
The filesystemobject object does not seem to detect a file or folder based on a url pointing to sharepoint, however the Application.FollowHyperLin
Open in new window