We have four computers in our office and use Microsoft SharePoint to host all of our files. We run into issues, where somebody edits a document and wants my review. They then attach the file to an email and send it. I save it, review and send it back. We now have multiple copies of the same document.
I'm looking for a way to copy the path to a document on the hard drive and NOT to the document in the cloud. I realize you can use protocols in the link to represent a folder in the users folder, or something specific. That way the link is the same on everyone's computer.
Does anyone have any suggestions for accommodating this?
I quite do not understand what you're trying to achieve in the details.
Could you give examples (with documents path on hard drive, cloud, ...) ?
Dealing with SharePoint can be done in several ways ... starting by how you're using it (sometimes people like to sync a SharePoint folder to their hard drive for instance).
Sure. All of our computers in the office have the Sharepoint folder mapped as "OneDrive - company.com" Withing that directory, all folders and files are the same on all computers. I would like to send a link to a specific file to another user, accessing the same path. The only difference is my path includes my user name, so it would not open on their computer.
I did find a solution, but not quite sure how to implement it. By using the Environmental Variable C:\users\%username%\OneDrive - company.com\ and then the file path, it goes directory to the user name, as opposed to searching for one. I've tried it with a few file paths and it works great. Here's a full example: C:\users\%username%\OneDrive - company.com\A&C - Documents\03-Finance\A&C WIP - Sample.xlsx
When someone receives this email and clicks on the link, it opens the actual file.
Now.... How do I implement this into a button/script. Something that copies only the path from OneDrive - company.com\... and adds the variable C:\users\%username%\ to it?
The idea of the environment variable username seemed interesting, and I tried to elaborate a short script to replace current user username in the path with %username%, which is quite doable.
Problem comes when trying to open the link once it has been passed through an email.
It seems it is not doable :
A solution could be to retrieve an url to the document within SharePoint, but this might require either :
Accessing the document through an internet browser and get the link from there. Probably not the most usable if you're having the SharePoint site linked under user account (meaning you mainly work from Opus)
Revert to scripting, probably powershell, to create the link from the path. I did some things using that approach and PnP (GitHub - pnp/powershell: PnP PowerShell). It's a lot more heavy since you need powershell scripting and then you need to call powershell from command line (no direct integration in Opus). So it looks like doable but not straightforward. If you are at least a bit comfortable with powershell I could give you examples, but basically it revolves around asking SharePoint an url for a path you would construct from your path transformed into a site path (a regexp should do the trick).
ClipEdit lets you modify paths in the clipboard. It'll work for aliases and environment variables. If you need to change server names, protocols, etc. that'd be an additional step. This could be done in the script or with the Evaluator.
I think this will end up with an issue transmitting the path trough email : links with environment variables seem not to work in outlook (or more genrally html) emails.
Using Opus aliases does not seem to be a solution neither as Outlook will try to open directly the path provided, without asking Opus any "translation".
Yet, it's worth a try ...
Especially if you know the username of the recipient, you could transfer without env variable but with direct recipient username. But only the recipient will be able to open though the link.