Last year I blogged about how to make auto-contact URLs for Lync voice and IM.
A few days ago, a reader emailed me about going one step further – embedding an IM link in a SharePoint page.
“I am trying to add a Hyperlink to SharePoint to automatically start a Lync Chat with someone. I did try to use the example you gave IM:but SharePoint wants only certain formats, which IM: is not one of.”
“I tried with most of them adding your syntax with no luck. Would you have any suggestions here to get SharePoint to open a Instant Chat to users via a Hyperlink?”
Personally, I never tried to set up an IM link in SharePoint. The tel: link always suited me.
So I went in search of a solution.
Will an Instant Message Link Work in SharePoint? Depends on the Format.
You can’t just drop an IM:<sip:chris@PMTestEmail.com> link onto a SharePoint page. You’ll see this error:
Which is what stymied the reader.
Pretty soon I came across this forum thread: Tel Hyperlink in SharePoint – TechCenter
In it, Paul J Barton posted a clever workaround. It reads like this:
1. Open Notepad and create the tel link My Number, save as text file (in my case tel.txt).
2. Open SharePoint and navigate to a doc library, upload text file from step 1.
3. Open a page and get it in edit mode, drop in a content editor web part, edit webpart settings and you will get a input box to enter the path to content.
4. Enter /%doclibname%/tel.txt, change the chrome of the web part so you only see the link, not the webpart title etc.
5. Save the page and you now have your tel link without SharePoint messing with your markup.
Paul clearly wrote this for creating tel: links in SharePoint. But since Lync will auto-recognize IM links as well as phone numbers, it SHOULD work for those as well.
Let’s find out if it will!
The Process of Creating an IM Link SharePoint Would Allow
Following the workaround’s instructions, I created a text file with a valid IM address. The format must be:
<a href=”IM:<sip:chris@TestDomain.com>”>IM Chris</a>
(Make sure you have this formatting exactly right. Including the brackets around the SIP address. I missed ONE bracket the first time and the link failed.)
After saving, I uploaded it to a document library. For purposes of this tutorial, I’ll say it was in /PM/Testing Library/. So its location URL becomes:
Next I went to an existing Site Page, and clicked “Edit Page”.
In Page Edit Mode, you should see page locations where you can click to “Add a Web Part”. I clicked one, and activated the Page Tools tab in the nav bar.
What we want is in the Media and Content menu – the “Content Editor” Web Part.
Click Add on the right to add it. You’ll see the new Web Part in the original page location, with “Click here to add new content” showing.
Ignore that. Instead click the arrow at top right of the field, opening its menu. Then click “Edit Web Part.” This will open up the full menu on the right.
You’ll see I’ve done this in the image on the right.
As Paul says in his workaround, click Appearance to change the chrome type.
In the “Chrome Type” drop-down menu, choose “Title and Border” or “Title Only”. This way the link will only show the link name you specified.
You should now see your IM link in the Web Part box. Click “Stop Editing” in the nav bar.
Once the page has refreshed, click your IM link to test it. If it’s formatted right, a new Lync IM window will pop up, ready to start a conversation!
It Works! Use to Generate Auto-Contact IM URLs in SharePoint
This is a workaround, albeit a clever one. I expect Lync Server 2013 will have something more elegant in its SharePoint integration.
In the meantime, many thanks to Paul for his input!
If you want more on creating HTML links for Lync services, head to this page at TheLync.net: Lync 2010 HTML URL Protocols for HREF tags