Mimic Sharepoint edit Office file download - sharepoint

When you browse a list of files in Sharepoint using IE and attempt to download the file, you get the option of opening it in read-only or edit mode. When you open the document, Office knows that the file exists in Sharepoint so when you save, it is updated in Sharepoint without the user having to re-upload the file.
I'd like to have this same functionality in a custom website. I have access to Sharepoint and the file list so I'm using the same URL that Sharepoint is to download the file but there's something else happening in Sharepoint that tells the computer to not download a copy of the file but to open it in Office from the Sharepoint URL.
Does anyone know how to mimic this same behavior so I can get a file to be opened in Office from Sharepoint to it can save directly back to Sharepoint?

The special thing about this, is the link:
It's not just http://example.com/document.docx . It's ms-word:ofe|u|http://example.com/document.docx .
Just add ms-word:ofe|u| in front of the link for letting the browser know to open the link with an other Application.
There are other strings for other links.
Open a OneNote-File with:
onenote:http://example.com/document.one
And Excel-Files with
ms-excel:ofv|u|http://example.com/document.xlsx
And just for fun a TeamSpeak Link:
ts3server://example.com

Create URL for MS Office 2010 (and higher) to:
open document in view mode:
ms-excel:ofv|u|http://server.com/path/filename.xlsx
open document in edit mode:
ms-excel:ofe|u|http://server.com/path/filename.xlsx
List of MS Office apps URL scheme names:
ms-word:
ms-powerpoint:
ms-excel:
ms-visio:
ms-access:
ms-project:
ms-publisher:
ms-spd:
ms-infopath:
MS has a good page with explanation:
MS Office Dev Center > Office URI Schemes

Related

Can I create a browser extension that prevents download of specific file types and forwards user to a link?

I want to create an extension that prevents Office documents download and instead opens them in Office Online. Do browsers (preferably Chrome and Edge) have such API and what code do I need to write to implement my idea?
If we talk about Edge then we cannot stop the file from getting download.
If you have the direct link of file then you can directly open it using Office Online.
You can try to store your Office files on OneDrive. Then you can open it via Office Online.
There is an extension available which supports both Chrome and Edge for the same purpose.
If you store the file in OneDrive then it can open the documents in Office online.
But, It cannot stop the Office files from getting download.
Quick access to your Office files in the browser
I did not get any code example to develop the extension that can prevent the user from downloading the Office file and open it in Office Online.
For chrome (although Edge is supposed to support chrome APIs but I've not tested) please check a potential solution at https://browserextensionresources.blogspot.com/2018/09/intercepting-file-download-in-chrome.html

Connecting existing document library to sharepoint site

I was experimenting with MS Flow in Office 365, trying to automatically extract info from excel files. However, it turns out we made some "design error" in our sharepoint structure.
We have multiple central document libraries that are only linked to the Onedrive for Business environment and not connected to a Sharepoint site. (The latter turns out to be necessary for MS flow.) Is it possible to link existing document libraries to a sharepoint site?
EDITS:
Some background: within onedrive for business we have created multiple document libraries. See the screenshot below (blacked out are the ones we created).
Screenshot of Onedrive for Business "Site Contents"
Using MS flow I want to extract info from some of the Excel sheets in those doc libs. However, when using the wizards, I can only access files in document libraries that are created from a Sharepoint site (mine were apparently created directly in the OnedrivefB environment) or the main document library from OnedrivefB (as shown below; when choosing Onedrive, the File wizard only shows the files in the 'Documents' doc lib as also listed in the previous screenshot. Screenshot from Flow wizard
Elsewhere, I was told I should connect the document libraries we created to a Sharepoint site. But this person couldn't tell me how... Other suggestions are of course welcome as well!
Thanks, J
For completeness:
Step 1 in the wizard, showing sharepoint sites and onedrive for business
Step 2 in the wizard, showing options when choosing for OdfB
Step 3 in the wizard, only showing files from the document library called "Documents" in the first screenshot
A screenshot from one such document library with the Excel I am trying to access
Both OneDrive for Business and Sharepoint sites can be connected to MS Flow. If you are looking for the connection with OneDrive for Business, check the below link for triggers and sample templates
https://us.flow.microsoft.com/en-us/connectors/shared_onedriveforbusiness/onedrive-for-business/
Sharepoint -
https://us.flow.microsoft.com/en-us/connectors/shared_sharepointonline/sharepoint/
EDIT:
To access an Excel file in an OneDrivefB folder, browse and select the excel using file option. It will list all the folders in your OneDrive library.
.Second screenshot which you attached is sharepoint assets. they cant be linked to OneDrive. It can only be linked to sharepoint sites

Prevent Excel file download but allow read

We have uploaded an excel sheet to SharePoint 2013 document library.
We can click on this file and it opens in xlviewer.aspx page
We can also enter the url as http://sharepointsite/shared documents/docname.xls and the file will get downloaded.
Is there any way in which we can prevent download but allow users to view the file.
One solution is to put the excel sheet as a excel services webpart on a SharePoint site page.

How to open a stored in SharePoint from Team System task screen?

Someone put a hyperlink to a document stored in SharePoint, in the All Links tab of a TFS task.
When I double click it, it opens up in a new browser tab in VS2010, then asks whether to download it ("Open/Save" dialog).
The result is that the file is downloaded and then opened as a local copy.
What I want to do is to open the document directly from the URL of the SharePoint site so editing will be done directly.
Is this possible?
Thanks!
I would asume that if you select "Open" that it would open off the sharepoint server. If this is not the case, then you would need to navigate to that document in Team Explorer or on the Sharepoint site and open it from there.

Office files stored on SharePoint 2010 do not open in client office application

I have an isolated issue with a user who has IE 11, office 2013 and is trying to open office files stored on SharePoint 2010 document libraries.
When he clicks on the document, the office application starts but does not open the document. He has to download a copy of the document and make changes locally.
Other users can open the files fine and their client instance of the office application works no problem to open the document. This behaviour is the same for any office file on the SharePoint 2010 farm. pdf files behave normally and open in acrobat. With text files notepad doesn't even appear so slightly different but still incorrect behaviour.
I have tried adding the site to his trusted sites in IE. Using Firefox and the behaviour is the same. Repaired office, same issue. All other users are OK.
Any help appreciated as I have exhausted google.

Resources