Forum Discussion
Gilgamesh1964
Apr 06, 2023Brass Contributor
Accessing SharePoint Text file via VBA
I originally posted this query in the SharePoint community a while ago but didn't get a response so I'm posting here. I have a VBA macro in MS Project that needs to read a text file located on Sh...
Paul_Mather
Apr 06, 2023MVP
Hello Gilgamesh1964 ,
How are you authenticating to the SharePoint Online tenant from VBA? Here are some posts for VBA in Excel that might help you get started:
https://sharepoint.stackexchange.com/questions/272896/vba-autheticate-to-sharepoint-office-365
Paul
- Gilgamesh1964Apr 11, 2023Brass ContributorThank you for taking the time to respond.
I wasn't doing anything in VBA to authenticate. Our browsers, teams, OneDrive can access SharePoint after a normal logon to our domain with no further authentication requests, so some sort of federation exists.
My (obviously mistaken) belief was that would be sufficient for VBA, and I wouldn't need anything else.
I have looked at the links you provided and the details there are (currently) a bit much for me to worry about.
My need to read from SharePoint would have added a "nice to have" feature rather than a "must have" feature, so for the time being I may let it drop.- Paul_MatherApr 11, 2023MVP
Hello Gilgamesh1964 ,
From VBA to connect to SharePoint Online, you would need to authenticate. For the apps you mention, MS handles the auth for those, in custom code, you'd need to handle the auth.
Paul