How to create a desktop shortcut to a Onedrive file

I would like to create a shortcut on my desktop to an Excel file located on OneDrive and having it open in Excel. (I'm using Windows7 and Office 2013)

Within Excel, I have retrieved the path to file (https://d.docs.live.net/cxxxxxxxcexxxxx/Documents/myfile.xlsx). But if I create a shortcut with Url it opens the file within my Browser and not within Excel.

The creation of a shortcut forcing the usage of Excel ("excel https://d.docs.live.net/cxxxxxxxcexxxxx/Documents/myfile.xlsx") fails at "The path does not exist".

Any other idea ?


Solution 1:

Instead of hacking internal paths, go native way referring to your locally stored synced copy of the OneDrive file:

  1. In Windows Explorer, open your OneDrive Personal Folder (typically it has a cloud icon)
  2. Right-click your file
  3. Select command Send to > Desktop (create shortcut)

This way, you care only about your local copy of the file and you let OneDrive to do the sync with cloud version of the file – so you no longer need to use paths referring to cloud by yourself.

Solution 2:

Instead of using the http://... shortcut, I used a shortcut starting with \\d.docs.live.net@SSL\DavWWWRoot\cxxxxxxxcexxxxx/Documents/myfile.xlsx, and it opens the file directly in Excel.

Solution 3:

Try using the full path to Excel in your shortcut rather than just 'excel'.

for example:

"C:\Program Files (x86)\Microsoft Office\root\Office16\Excel.exe" "https://d.docs.live.net/cxxxxxxxcexxxxx/Documents/myfile.xlsx"

(path will vary depending on your version of Office, you'll need to look through Program Files yourself and find which path is correct)