Forum Discussion

Intern_Dan's avatar
Intern_Dan
Copper Contributor
Jun 19, 2019

VBA to open excel files in teams

Hi 

 

I wrote a VBA script to loop through a folder and open any .xls files and it has been working great for 3 months.

Since then my team has migrated to Teams and I need to change my file path to the teams folder.

 

Can anyone please assist with a VBA Script that can loop through a teams folder and open any excel files in it

 

Regards

  • Basically you need to share point URL’s In the script you also have to make sure that it got access to that location in SharePoint as well
    • cesamseed's avatar
      cesamseed
      Copper Contributor

      adam deltingerI exactly have the same issue.


      What are the API to use to access to an Excel file stored in Teams.

       

      Do you have an example.

       

      Thanks

      • petri2000's avatar
        petri2000
        Copper Contributor

        cesamseed Any updates on this? I have same issues and there seems to be pretty limited info and actual guidelines on this topic. Basically guidelines VBA/Excel work against teams.

    • Intern_Dan's avatar
      Intern_Dan
      Copper Contributor

      Thanks for your reply adam deltinger 

       

      The script I use loops through a folder opens each workbook and then copies data into one master workbook.

       

      My questions are;

      - how can I change the file path to now open these workbooks in Teams

      -- do you have any examples of code?

      -will it open the workbooks or open them online through teams?

      -- If it does open them online will the rest of my copying macro work?

Resources