Microsoft 365 features that help users manage their subscriptions, account settings, and billing information.
Hi Sebastian,
I'm working on the same problem. I think Sukie has misunderstood the situation - Sukie, it's not that Sebastian's colleagues should be able to access the C:\Users\Sebastian... link, but that the link generated by onedrive+sharepoint automatically contains the user's name in the URI since OneDrive stores sharepoint-synced folders in the user's home folder.
The alternatives:
- Use the full sharepoint address instead of the OneDrive synced address
This works for simple documents, for example read-only access to information.
However, you cannot edit files directly using this method - for example if you link .accdb files with this method, they are opened from the temporary internet objects folder (!!); any changes you make and save are written to the temp copy, and are lost when you close the file.
- Update every directory link each time
Sebastian, in your example you already edit a path in VBA when the user runs a macro. You could update the directory URI for each directory link during the same macro.
However: if you have more than a handful of links, this is a non-option due to the amount of overhead.
- Use relative links
The best method I have found so far is to use relative links. You can start a filepath with ./ to start a path in the same folder as the file that the macro is being run from. For example Sebastian if your VBA file is in the EEG-LIS folder, you use the path: ./PV/Street 123
You can also use ../ to go up a folder in the hierarchy; for example if your working file is in EEG-LIS/master/code/ then your path would be ../../PV/Street 123
The downside here is that you have to store your file with VBA code in the onedrive folder, otherwise the relative path still requires the username.