Question

I am a regular user of Sharepoint and OneDrive and have been a VBA developer for some time and I have the following problem:

When I run macros stored in Word and Excel macro-enabled templates on files that are stored on a SharePoint drive, they fail. These same macros work fine when running on files stored locally on a computer or on a network server. The macro-enabled templates are not stored in SharePoint.

Specifically, I have a client who accesses Windows Explorer and opens a local directory that is synced with SharePoint. If they open a file from this location and attach a macro enabled template to it and run VBA macros, they fail for various reasons. However, when we move the file to a directory on their network, open it and attach the macro template, everything runs fine.

I can also repeat this work by accessing files in OneDrive and selecting to edit the document locally. Attaching a macro template works great. It seems to only crash when running from a location that is synced with SharePoint.

I suspect that sharepoint is interrupting the compiling and running of the code by syncing the local copy with the copy in Sharepoint but I know next to nothing about Sharepoint so this might make no sense at all to the experts!

Any ideas?

Thank you!

No correct solution

OTHER TIPS

This can be related to the trust and security settings. Can you download one such file to you local, right click to open the properties, go to General tab and click the 'Unblock' box under security section and try running the macro again?

enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top