Open a file directly in Teams from a tab - sharepoint

I have deployed a SharePoint webpart (SharePoint Framework) to Microsoft Teams. In this web part, I have a list of files that I want to open directly in Teams.
I have tried to get the link from the "Files" tab (https://teams.microsoft.com/l/file/7FFA7D9D-CBF1-4679-9C80-76446AE11ABD?tenantId=0f48c6f4-52a5-4553-b476-4ee2ee0aecca&fileType=docx&objectUrl=https%3A%2F%2Fxyz.sharepoint.com%2Fsites%2FAZRTZ%2FShared%20Documents%2FGeneral%2FArchitecture%2FTest.docx&baseUrl=https%3A%2F%2Fxyz.sharepoint.com%2Fsites%2FAZRTZ&serviceName=teams&threadId=19:0d1f6f397c51421189e791a9ab436a48#thread.skype&groupId=98edc5a8-02ac-4f58-8638-ea88ac6aaa4d) and put it in the href="" of the link. It does not work, it opens the file in the browser.
I also tried to put the direct link in the href (https://xyz.sharepoint.com/sites/AZRTZ/Shared Documents/General/Architecture/Test.docx). It downloads a copy of the file in the browser.
I want to open the file directly into Teams, the same way the files are opened if the user goes to the "Files" tab (eg. if the user opens a .doc file, Word Online in Teams must open, if the user opens an image, a previsualisation in Teams must be opened, ...)

Succeed with a shorter version of the Deep Link syntax myself, in a message card from an incoming webhook connector, provided I used the OpenUri action syntax and not a plain markdown link:
https://teams.microsoft.com/l/file/?fileType=<extension>&objectUrl=<absoluteUrl>
this was linking to Sharepoint files.

Using the Deep link I managed to open the file directly in Teams. I had to format the URL :
https://teams.microsoft.com/l/file/{file-id}
?tenantId={tenant-id}
&fileType={file-type (jpg, xlsx, docx, ...)}
&objectUrl={file-encoded-link (SharePoint link, aboslute URL)}

Related

Links i harmon.ie offers a download, not the actual SharePoint document

When I attach a link in an email using harmon.ie, I get an url that includes the file name. However when the recipient clicks it, it starts to download a copy instead of opening the actual SharePoint document.
The link is typically on this format:
[company].sharepoint.com/sites/[subsite]/[library]/[filename.docx]
The same link retrieved directly from SharePoint would look something like this:
[company].sharepoint.com/:w:/s/sites/[subsite]/EZ31C3wRKuVPnOOB7vNGMsMBiI9eYAjGTuiaEODu_c3wpw
That link will typically open the document in SharePoint as expected.
It did not use to be like this. The links from harmon.ie used to open documents instead of downloading copies. I am afraid I cannot say when we discovered this, but I believe it was a couple of months ago. We are using the free plan, and are not qualified for support from harmon.ie. We were pointed in the direction of this forum, and I would be most grateful if someone could help us.
Thanks
Eigil
Harmon.ie creates plain valid links to Sharepoint document and they are opened by default browser (like any link you will add inside an email)
The behavior is only controlled by the browser not by harmon.ie (you can check it out by adding the url in the browser)
The only solution to control the behavior is to use the feature to generate OWA link so that it opens in Office online.
Indeed, we have feature allowing to create links that will open in OWA (hence in the browser)
Please read carefully register key: GenerateOWALinks as detailed at https://harmon.ie/provision-harmonie-outlook-all-users
Note also that if the recipient of the email has harmon.ie installed, he can right click on the link, select Open in Harmon.ie. The document will appear in harmon.ie sidebar (at the Sharepoint location), double clicking on it with open the document in MS Word.
Thanks,
----- Jean

autoclick on download icon, as soon as page loads

My Question:
There are hundreds of unique URLs from where I have to download the zip file after clicking on the download icon. Is there any way to automate this process.
My process:
Open the unique web page URL,
Download icons appears.
Click on download icon to download the file.
Same process for rest of the pages.
Notes:
Each zip file has the different name.
Files are hosted in the secured server.
No access to directory folder.
Download icon position changes on every page.
Any chrome extension or fire fox ad don to solve this repeated task? Appreciate your help.
If you have download url list, then there are lots of add-ons that will help you download them, like DownThemAll
But if you do not have download url list, you will need to have a custom extension solution. Because, first extension needs to connect your server and retrieve download url before downloading the actual file. There needs to be Regular Expression difficulties which enforces custom extension solution.

Mimic Sharepoint edit Office file download

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

Opening documents after checkout from SharePoint

Why won't my document that i'm checking out from SharePoint not open after the checkout?
The status of the document after the check on SharePoint shows that I checked out the document but it won't open automatically.
What's even more annoying is that I don't know where the file has been checked out to.
Is there any way to find out where the document is being checked out to and how to get it to open automatically after the checkout?
I tried it both on Chrome and IE.
Check Out in short means "Reserve the file for me so that no one else makes any changes to it. It does not mean "Open the document"
SharePoint also shows the Checkout status and to whom it is checked out. I will be able to explain more if you tell me "what exactly you see" and why you think these details are missing.
In Sharepoint the checkout prevents other user to modify the document.
You can then open the document clicking on the title.
Your client application (Word for example) will open the document directly from the Sharepoint site.
When you will save the document after changes, it will be saved on the site.
You don't need to save a local copy because the document library works like as a shared folder.
You can even connect the document library on a drive letter if you want.
Try this from a command prompt:
net use k: http://YourSite/YourDocumentLibrary
This will create a network drive that point on the library.
(it works only with WebClient service running on client machine).
The best way to "checkout and edit" is to open the document using its sharepoint url.
For example, if you have a Word file to edit, you can copy its sharepoint url and go to MS Word and paste it in Open dialog box.
You will be asked for credentials and then it shows the checkout button on top of the document.
Later, you can checkin the edited doc using checkin option in file menu.

Sharepoint document library file type and click events

I have a sharepoint document library where users upload files.
The allitems.aspx (the standard view) doesn't show correct icon for PDF and other files. Why is it so?
Also when users click on the document it doesn't open the file. For example clicking on a PDF document doesn't open using Acrobat reader even though it is installed on the server.
I even checked the file association by going to IE->Tools->Internet options->Set programs. The PDF is associated to acrobat reader.
Is there any other place to check?
Another issue is with the JPEG file. Within allitems.aspx it shows the image icon but when I click it tries to open using IE (which is fine) but doesn't load the image.
Are there any other settings? Please suggest. thanks.

Resources