Saving file to Sharepoint Document library via VBA code

D

Dale Fye

I'm working on an Access application and one of the capabilities that my
client wants is to be able to save a file to a document library on his
SharePoint 2007 server.

I'm using the FileOpenSave API to get the name of the file, and have been
saving the file to a shared drive on their network server, along with storing
they file name and path to a table in my application. Now they are
implementing MOSS 2007 and their intent it to get rid of their shared drives
on the server, so I really need to figure out how to do this. I know they
can open Sharepoint and upload the file, then get the file name, but would
prefer to do this without actually having to open sharepoint.

Does anyone have a code example that would help me accomplish this?
 
D

Daniel A. Galant

I'm not a developer, so this is not my strong suit, but if you are already
saving the file to a file share, couldn't you simply change the path you are
using in your current solution to point to the SharePoint library instead?
 
M

Mike_8234

I'm working on an Access application and one of the capabilities that my
client wants is to be able to save a file to a document library on his
SharePoint 2007 server.  

I'm using the FileOpenSave API to get the name of the file, and have been
saving the file to a shared drive on their network server, along with storing
they file name and path to a table in my application.  Now they are
implementing MOSS 2007 and their intent it to get rid of their shared drives
on the server, so I really need to figure out how to do this.  I know they
can open Sharepoint and upload the file, then get the file name, but would
prefer to do this without actually having to open sharepoint.

Does anyone have a code example that would help me accomplish this?

--
Dale

email address is invalid
Please reply to newsgroup only.

Every doc library in SharePoint has a webdav folder. You can acccess
this through the actions dropdown, or as follows: if the web address
is http://site/documents, then \\site\Documents will be the webdav
address.
 
P

Peyton King

So trying something like this out of access does not seem to catch WEBDAV so
there must be at least one point I am missing; any suggestions would be
appreciated...

Function AppendOrgChartHtmlFct(tempTxt)
Print #FILE01NBR, tempTxt
End Function
Function OpenOrgChartHtmlFct()
' FILE01NAMEPATH = "C:\00_WEB\DSWRK\DOS002_OrgChart\OrgChart.HTM"
' FILE01NAMEPATH = "\\XXX\TabLibrary\Forms/OrgChart.HTM"
FILE01NAMEPATH = "\\XXX\TabLibrary\OrgChart.HTM"
FILE01NBR = FreeFile()
Open FILE01NAMEPATH For Append As FILE01NBR
End Function
Function CloseOrgChartHtmlFct()
Close FILE01NBR
End Function

Thanks!

Peyton
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top