I have the following idea!
First, connect my Excel with a SharePoint, to get a SharePoint-List.
Second, iterate through every item of the list and open them one by one.
In every list-item is a library with different files in it. Such as Word, Excel, etc.
I need to count how many list-items are in the list and how many files are in every list-item.
If that's working, then...
Open the right Excel file in the list-item of a SharePoint. Something like '%activities% in the name of an excel file.
Count the lines in this Excel file and copy the data into a new Excel file.
So in the end we would have a new Excel file with several sheets from different excel files. Is that even possible? Or is that idea too crazy : )
I tried to connect like this:
Sub test()
Dim dm As New DriveMapper
Dim sharepointFolder As Scripting.folder
Set sharepointFolder = dm.MapDrive("\\***.sharepoint.com@SSL\sites\General1462\Lists\")
Debug.Print sharepointFolder.Path
End Sub
But I got an error code (800704dc). I tried with this solution Get the content of a sharepoint folder with Excel VBA