Home

VBA to open excel files in teams

%3CLINGO-SUB%20id%3D%22lingo-sub-707185%22%20slang%3D%22en-US%22%3EVBA%20to%20open%20excel%20files%20in%20teams%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-707185%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20wrote%20a%20VBA%20script%20to%20loop%20through%20a%20folder%20and%20open%20any%20.xls%20files%20and%20it%20has%20been%20working%20great%20for%203%20months.%3C%2FP%3E%3CP%3ESince%20then%20my%20team%20has%20migrated%20to%20Teams%20and%20I%20need%20to%20change%20my%20file%20path%20to%20the%20teams%20folder.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20anyone%20please%20assist%20with%20a%20VBA%20Script%20that%20can%20loop%20through%20a%20teams%20folder%20and%20open%20any%20excel%20files%20in%20it%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERegards%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-707185%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-707282%22%20slang%3D%22en-US%22%3ERe%3A%20VBA%20to%20open%20excel%20files%20in%20teams%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-707282%22%20slang%3D%22en-US%22%3EBasically%20you%20need%20to%20share%20point%20URL%E2%80%99s%20In%20the%20script%20you%20also%20have%20to%20make%20sure%20that%20it%20got%20access%20to%20that%20location%20in%20SharePoint%20as%20well%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-719099%22%20slang%3D%22en-US%22%3ERe%3A%20VBA%20to%20open%20excel%20files%20in%20teams%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-719099%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20for%20your%20reply%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F72542%22%20target%3D%22_blank%22%3E%40adam%20deltinger%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20script%20I%20use%20loops%20through%20a%20folder%20opens%20each%20workbook%20and%20then%20copies%20data%20into%20one%20master%20workbook.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMy%20questions%20are%3B%3C%2FP%3E%3CP%3E-%20how%20can%20I%20change%20the%20file%20path%20to%20now%20open%20these%20workbooks%20in%20Teams%3C%2FP%3E%3CP%3E--%20do%20you%20have%20any%20examples%20of%20code%3F%3C%2FP%3E%3CP%3E-will%20it%20open%20the%20workbooks%20or%20open%20them%20online%20through%20teams%3F%3C%2FP%3E%3CP%3E--%20If%20it%20does%20open%20them%20online%20will%20the%20rest%20of%20my%20copying%20macro%20work%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-979122%22%20slang%3D%22fr-FR%22%3ERe%3A%20VBA%20to%20open%20excel%20files%20in%20teams%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-979122%22%20slang%3D%22fr-FR%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F72542%22%20target%3D%22_blank%22%3E%40adam%20deltinger%3C%2FA%3E%20I%20exactly%20have%20the%20same%20issue.%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EWhat%20are%20the%20API%20to%20use%20to%20access%20to%20an%20Excel%20file%20stored%20in%20Teams.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDo%20you%20have%20an%20example.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3C%2FLINGO-BODY%3E
Intern_Dan
New Contributor

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

3 Replies
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

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?

@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

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
35 Replies
Extentions Synchronization
ChirmyRam in Discussions on
3 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
29 Replies