Solved

Export or FileCopy files from Access 2003 to Sharepoint Server

Posted on 2013-05-31
6
493 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
ID: 39218602
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
ID: 39219524
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
ID: 39219612
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
ID: 39219636
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
ID: 39412019
Thanks.,
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

910 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

20 Experts available now in Live!

Get 1:1 Help Now