Solved

Export or FileCopy files from Access 2003 to Sharepoint Server

Posted on 2013-05-31
6
515 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I thought I'd write this up for anyone who has a request to create an anonymous whistle-blower-type submission form created using SharePoint 2010 (this would probably work the same for 2013). It's not 100% fool-proof but it's as close as you can get…
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

730 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