mlohmac
MIS
- Oct 28, 2002
- 10
Hello All,
This problem is driving me crazy. Seems like it should be easy to do but maybe I am just showing my ignorance. Here is what I am trying to do:
From Excel I want to open all the files that reside in a SharePoint document library. I want to do this when a user clicks a button in a user form. So far this is what I have come up with:
Private Sub cmdConsolidate_Click()
Dim swsWorkspace As Office.SharedWorkspace
Dim i As Long
Set swsWorkspace = ActiveWorkbook.SharedWorkspace
For i = 1 To (swsWorkspace.Files.Count)
Application.Workbooks.Open swsWorkspace.Files.Item(i)
Next i
End Sub
This works like a charm but it requires the user to open a file in the document library first in order to get the active document to be the active workbook.
Does anyone know how I can open all the files in a SharePoint document library without having the user open one of the files in the library first?
Thanks!
-Cameron Holm
This problem is driving me crazy. Seems like it should be easy to do but maybe I am just showing my ignorance. Here is what I am trying to do:
From Excel I want to open all the files that reside in a SharePoint document library. I want to do this when a user clicks a button in a user form. So far this is what I have come up with:
Private Sub cmdConsolidate_Click()
Dim swsWorkspace As Office.SharedWorkspace
Dim i As Long
Set swsWorkspace = ActiveWorkbook.SharedWorkspace
For i = 1 To (swsWorkspace.Files.Count)
Application.Workbooks.Open swsWorkspace.Files.Item(i)
Next i
End Sub
This works like a charm but it requires the user to open a file in the document library first in order to get the active document to be the active workbook.
Does anyone know how I can open all the files in a SharePoint document library without having the user open one of the files in the library first?
Thanks!
-Cameron Holm