11-28-2018 02:54 AM - edited 11-28-2018 03:09 AM
My company has a bunch of Macro enabled Excel files. We have been in a steady progress of migrating our data to Microsoft Teams. I have been informed that the Macros don't work on Microsoft Teams. What would be the right way to execute Macros on Microsoft Teams
11-28-2018 10:36 AM
Macros don't run in the web-based Office versions, thus in Teams as well. You should still be able to open the file, but if you want the macro to execute, open it with the desktop Excel app.
11-28-2018 09:50 PM - edited 11-28-2018 09:52 PM
What I would like to know is that would the macro work on a file that is stored online in SharePoint also there are different folder paths defined in my macro so how to amend the same to fetch the file destinations and location in Teams
11-28-2018 10:21 PM
Hi @Jebin
If I understand the scenario right, I do not believe there is a way to do this.
My understanding is that Excel will hardcode those locations and SharePoint Online doesn't have the same structure as say a file drive would.
I could be wrong but I doubt you can do this! Anyone else know?
Cheers
Damien
05-14-2020 12:15 PM
Yes I think you are correct.
Excel macros write to a network fileshare, while Teams has a different protocol, you would have to make API calls (HTTP REST), authenticate most likely, etc. When people migrate from Excel Macros to microsoft online/O365/Teams/etc. they have to re-write their VBA macros in Javascript.
Found this on another link, it may be useful for people to try the 'self-service' type 'Flow' app.
https://www.reddit.com/r/excel/comments/balh98/excel_vba_macros_and_microsoft_teams/
https://flow.microsoft.com/en-us/blog/microsoft-flow-in-microsoft-teams/
05-21-2020 09:07 PM
@JebinJust save the files in trusted location. File- Option-Trust center
11-10-2020 02:50 AM - edited 11-10-2020 02:56 AM
@Jebin bit late on this thread but for anyone else. You can store files in Sharepoint, then Sync them from within Sharepoint to your computer. This will then create a folder similar to your OneDrive folder within Windows Explorer. You can then use that as a file location/filepath within VBA and queries. Neither of these features work in the Online version of Excel but can be used if opened with the desktop version. The only issue I have found with this is that it's sometimes a bit clunky if I have it open in Desktop and others have it open in Excel Online. If I refresh a query it then says my and the others using the online version cannot be synced and therefore doesn't save. You could arrange a time I guess when nobody has it open so the queries could be refreshed