Is there something else involved like using the Checkin/checkout functionality that I have missed? I tried to do an extensive search on the web for the past several days but am coming up with virtually nothing to cover deleting files.
Does anyone have ANY idea how to properly do this?? I need to use this for a current project and any immediate help or guidance is VERY MUCH APPRECIATED.
This might give you more info..
The Excel application is for project tracking for a client. Sharepoint site has been set up with a different directory for each project step. Within the Excel app, the user must complete specific cells in the worksheet, then click (embedded) command button (different for each step) to initiate the next step. When the specific button is clicked, the excel application/workbook needs to be moved from one sharepoint library/directory to the next. I am able to use SAVEAS but can not remove or even rename the existing Excel workbook within the current directory.
I am trying to accomplish this using VBA within the spreadsheet because of time constraints. I would like to learn Excel Web Services for Sharepoint for future , but am against a tight deadline for this project.
The link you referenced included the statement "The previous steps assume that you are building the Web Part on a computer where Office SharePoint Server 2007 is installed." The Sharepoint Server I am using is being hosted by another company and I do not have server level access. My group access level to the site is Reader and Contributor.
Whom is in control with the server, you will not be able to do what you need to do.
Application.Workbooks("Book1.xls").CheckIn SaveChanges:=True, Comments:="Checked-In before Delete"
When I use the supplied code, the macro stops at the first statement of 'Workbooks("Book1.xls").sharedworkspace.removedocument' and I get run-time error 5, with this message: 'Invalid procedure call or argument.' If I click Run again, the macro proceeds and deletes the file. Any idea what's causing the hiccup?
I am most interested in if you found a solution to the problem of deleting a workbook file from sharepoint library with excel vba.
To date i have not found a solution.
Or be able to move a document from one folder to the next at the very least.