2

I've searched around for some answers to this, but nothing I found seemed to work. I'm good with VBA, but Sharepoint is not my cup of tea. We have a corporate Sharepoint site on the web (https) where different regions submit metrics using Excel. Each Excel file is placed in the region's respective folder.

What I want to be able to do is use a local workbook to navigate to the Sharepoint site, go through the folders, open each Excel workbook, and aggregate the numbers together. The closest I've come so far is this.

However, let's say my site is:

[https://teams.mycompany.com/SubTeamFolder/Forms/AllItems.aspx.]

Nothing gets returned when I set the site variable to this in the code from the link above. If I set the site variable to something like:

[https://teams.mycompany.com/SubTeamFolder/AllItems/]

it throws error

-2147217895

.

I'm open to other approaches here. Like I said, this one seemed the most promising till I hit this wall.

Community
  • 1
  • 1
Jeremy
  • 224
  • 8
  • 18
  • 1
    [This question](http://stackoverflow.com/questions/1344910/get-the-content-of-a-sharepoint-folder-with-excel-vba) might have some useful information for you. – ARich Feb 13 '14 at 17:58
  • This was very helpful. I was able to export the library to Excel to get the underlying file path. With that, I'm able to at least read the various file names in the directory. Thanks so much. – Jeremy Feb 13 '14 at 18:28

1 Answers1

1

Just as an FYI for those who come across this, here is how I worked through this. In the link submitted by @ARich, I went towards the bottom and used the Export to Excel functionality. This let me see the underlying path for my objects. I was then able to use the code I linked to in my original post to see the underlying folders. If you need to, insert a couple of breakpoints once you successfully connect to your target Sharepoint site to follow along with the recursive movement from parent to child object. Taking it a step further, you can then open the files using this.

Jeremy
  • 224
  • 8
  • 18