简体   繁体   中英

How can i create a shortcut file to a sharepoint document library so that i can email it to people

I need to create a shortcut file that links to a sharepoint document library and then send that in an email (don't worry about outlook blocking lnk files). I have had a look at how to how to create a standard shortcut file in C# but this fails when you give it a server address (\\servername\\site\\documentlibrary)

Does anyone have an idea on how to do this.

Also would be super to know how i can convert the link into and SPFile object so that i can also attached it to a list item once i have created it.

To try and add some more context. I cannot just send the user an html link in an email as the end functionality is that the user will be able to dragfile onto the shortcut and have them imediatly uploaded to the document library.

Can't you just send the URL of the document? Or does it need to be a UNC link?

If you are looking to send a link in email, just right click the link, copy the URL and paste it into the email.

If you are looking for a UNC based approach, a quick way to do it is make sure the WebClient service is running (this is important!). You can then open the file in Windows Explorer view and prepend the folder name you will see in the address bar to the name of any file in the folder and send to users via email.

Not sure I understood your question exactly, so if I am stating the obvious, apologies!

John

Interesting concept, but you may want to consider using a more 'web friendly' way of dealing with shortcuts, for example Short URLs.

I have worked on a TinyURL implementation for SharePoint which can be accessed from a Web Service, SharePoint User Interface as well as a SharePoint Designer workflow.

I am obviously biased as I worked on this, but you may want to consider it.

I just did this today, it works just like what you need:

  1. From sharepoint workspace, do "search". If its not in your ribon, add "search" first.
  2. A standard windows explorer search comes up.type the name of a document in your library and search.
  3. Select the document you want from results, and create a standard desktop shortcut to it.

You will notice that the target document lives in "search-ms". It looks strange but it works. The installed sharepoint search protocol will find and open the document when you double-click the link.

I haven't tried emailing the lnk to another computer, but it should work. It seems that when opening the link, it is handled by the "search-ms" protocol which passes it to the search plugin that Sharepoint workspace (or office?) installs. So the user receiving the lnk will need to have sharepoint installed as well.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM