
Managed to sort it out myself
Updated comments in https://github.com/MikeWilliams-UK/Word-VSTO-Template/wiki/5.-Documents-saved-to-OneDrive
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I am creating a VSTO Template for Microsoft Word using Visual Studio 2019.
I have created a GitHub repository https://github.com/MikeWilliams-UK/Word-VSTO-Template to share generic code.
I have documented my journey in getting this working in the projects Wiki https://github.com/MikeWilliams-UK/Word-VSTO-Template/wiki
I am stuck when I save a document to my OneDrive, then try to open it.
I get the error message seen at https://github.com/MikeWilliams-UK/Word-VSTO-Template/wiki/Documents-saved-to-OneDrive even though I have added my OneDrive's folder into Word's list of trusted locations.
Can sonone please help?
Managed to sort it out myself
Updated comments in https://github.com/MikeWilliams-UK/Word-VSTO-Template/wiki/5.-Documents-saved-to-OneDrive
Thanks @Mike Williams . I know it's been a year since you posted this, but this put me on the right path to fixing my issue...
And for those using a personal OneDrive account, you can do the same thing by using "https://d.docs.live.net/nnnnnnnn/" as the folder to put in the trusted location, where "nnnn..." is the identifier for your account. If you just use "https://d.docs.live.net/", it will also work but you will be automatically trusting all files on anybody else's OneDrive folder that they shared with you (not ideal).
I haven't found an easy way to figure out the identifier... Microsoft goes through great length to hide the fact they are actually opening a web location, and not a local file. The way I found the actual address was to open a file from the OneDrive folder in Excel, go to the developer tab and run visual basic (do a google search to enable the developer tab if you don't see it). In the "Immediate" window in VB, type "? ActiveWorkbook.FullName". That will show you the full filename which points to the OneDrive path, including your identifier...
It's beyond my as to why MS didn't include this detail in their document that explain how to enable macros. They even have a section dealing with files from a Onedrive location, and all they put was "add trusted folder location" ???
Glad that my efforts have helped at least one person.