Solved

Export or FileCopy files from Access 2003 to Sharepoint Server

Posted on 2013-05-31
6
481 Views
Last Modified: 2013-08-15
Is it possible to transfer files from Acccess 2003 VBA that will either export or Filecopy a zipfile or datafiles from an Access 2003 mdb to a Sharepoint server.

First I would like to know if this is possible and I am looking for sample code.

the following will work on Windows 7, but not on an XP box.

Call FileCopy("R:\Access\Development\Gina\Automated\STA RSprositUpdate\DocumentsMissingStatus.xls", "http://collaboration.organon.intra/sites/GCORM_Business_Analysis/Sample BARP Process Site/SCBM STARS Test/DocumentsMissingStatus.xls")
__________________________________________________________

Part 2:

The file I need to save would be the daily run of agroup of files (.zip) that would include the current date.  As part of the validatation process I would like to validate the last file in the Sharepoint and retrieve all zip files from that date to present from the specified file location.  What would be the best approach to Look for the Max(Created Date) for the particular file name, and create a multifile upload process automatically.

Is there another workaround?

Thanks,

Karen
0
Comment
Question by:Karen Schaefer
  • 3
  • 2
6 Comments
 
LVL 14

Expert Comment

by:Bill Ross
Comment Utility
Hi,

Try the code without the http in the destination like below.

Call FileCopy("R:\Access\Development\Gina\Automated\STA RSprositUpdate\DocumentsMissingStatus.xls", "//collaboration.organon.intra/sites/GCORM_Business_Analysis/Sample BARP Process Site/SCBM STARS Test/DocumentsMissingStatus.xls")

I don't understand Part 2.  Are you trying to copy from the R to SharePoint or from SharePoint.  Perhaps split this out to a separate question.

Regards,

Bill
0
 

Author Comment

by:Karen Schaefer
Comment Utility
Thank you for for your input, however, removing the HTTP portion did not return an filecopy of the zip file uploaded to the Correct directory in SharePoint.

Disregard part 2.

I need to be able to Upload a zip file into SharePoint via VBA code, is it possible?  I am looking for code that will automate the Upload process from MS Access 2003 to a Sharepoint Location.

Karen
0
 
LVL 14

Expert Comment

by:Bill Ross
Comment Utility
Hi,

...the following will work on Windows 7, but not on an XP box.

Call FileCopy("R:\Access\Development\Gina\Automated\STA RSprositUpdate\DocumentsMissingStatus.xls", "http://collaboration.organon.intra/sites/GCORM_Business_Analysis/Sample BARP Process Site/SCBM STARS Test/DocumentsMissingStatus.xls")

If so then try removing the http and reversing the // like:

Call FileCopy("R:\Access\Development\Gina\Automated\STA RSprositUpdate\DocumentsMissingStatus.xls", "\\collaboration.organon.intra\sites\GCORM_Business_Analysis\Sample BARP Process Site\SCBM STARS Test\DocumentsMissingStatus.xls")

Regards,

Bill
0
 
LVL 14

Accepted Solution

by:
Bill Ross earned 500 total points
Comment Utility
more...

If that does not work then you will need to determine the correct SharePoint virtual  "folder".

Contact your SharePoint admin.  

On our server the upload folder is:

\\servername\DavWWWRoot\Uploads  (which works fine in the above code)

The http equivalend is:

http://servername/Uploads/

Which does not work.

Regards,

Bill
0
 

Author Closing Comment

by:Karen Schaefer
Comment Utility
Thanks.,
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now