How to add presence/pawn to SharePoint contacts list

I have often been asked to add the presence icon and functionality to custom developed web parts or SharePoint pages. As you are probably aware this is a very simple thing to do, the secrect lies in calling the IMNRC jscript function passing in an email address in the rendered html. e.g. IMNRC(''). You don't really need to know, or probably don't care how this actually works behind the scenes, so in summary; the IMNRC function calls an ActiveX control (called "name.dll") on the users machine which does the work, this control is installed with Office 2003. So developing web parts of custom SharePoint web pages with presence support added is pretty easy.

However, recently I had the requirement to show presence info on the email address field in the out of the box contacts list for WSS sites. I am not 100% sure why this feature was not added by the product team, but I guess it's because your contact list may have email addresses from users outside of your organisation and hence the presence information wouldn't make much sense. Anyway, I set myself the challenge of adding this. In theory it is not that difficult, you need to modify the CAML in the schema.xml for the contacts list to change the HTML that is rendered for the allitems view, i.e. inject the IMNRC function call for the email address field. In theory easy, in practice a little bit of a pain. I have therefore attached the sample CAML that I used in schema.xml for the contacts list. This is the viewbody section in the all contacts view i.e. <View BaseViewID="1">. Remember, this is sample code that you must test fully before deploying. Good luck!

<!-- for each field, if the field is called e-mail then spit out the imnrc function with the raw email address-->

        <HTML><![CDATA[<TD Class="]]></HTML>
    <Property Select="ClassInfo" />
   <Case Value="Menu">
     <![CDATA[ms-vb-title" height="100%]]></HTML></Case>
   <Case Value="Icon">ms-vb-icon</Case>
     <Expr><Property Select="Type" /><PresenceEnabled /> </Expr>
     <Case Value="UserTRUE">ms-vb-user</Case>
       <Property Select="Name" />
      <Case Value="Email">ms-vb-user</Case>
        <FieldSwitch> <Expr><Property Select="Name"/></Expr>
   <Case Value="Email">
           <HTML><![CDATA[<table cellpadding="0" cellspacing="0" ID="Tbl_]]></HTML>
           <HTML><![CDATA["><tr><td style="padding-right: 3px;"><img border="0" valign="middle" height="12" width="12" src="/_layouts/images/blank.gif" onload="IMNRC(']]></HTML>
           <Column />
           <HTML><![CDATA[')" id="mnid]]></HTML>
           <HTML><![CDATA["></td><td style="padding-top: 1px;" class="ms-vb"> ]]></HTML>

Use of included script samples are subject to the terms specified at

Comments (23)
  1. Point2Share says:

    Well this is welcome news (Thanks Mr. Bower, seems Michael doesn&amp;rsquo;t talk to me anymore), another…

  2. thorneb0b says:

    I’m really interested in using this feature for our firm’s electronic In/Out board. Do you have any additional advice or code examples of how to use the IMNRC feature? We have a SQL table with all of our staff (email, phone extension, etc.), and would like to tie this table to the IMNRC in a SPS/WSS page. Any examples or advice would be greatly appreciated, and we could discuss some compensation for coding work. I can be reached at for more details

  3. That is very possible. Essentially you need to emit HTML in your web part calls the IMNRC function around the email address e.g. IMNRC(’). For a good example, add the members web part to the page and then view the page source in your browser.

  4. BobChauvin says:

    Based on the info on the following page:,category,SharePoint-es.aspx

    I added the following to my dvwp list:


                                       <img border="0" valign="middle" height="12" width="12" src="/_layouts/images/blank.gif" onload="IMNRC(‘{@Email}’)" id="imn{ddwrt:Counter()}" ShowOfflinePawn=1 />


  5. BobChauvin says:

    Any idea why Frontpage modifies calls to {ddwrt:Counter()} to (generate-id}

    This breaks the imnrc functionality when I use it in more than one web part on a page.

  6. Just a little tip as I finally crossed over to the dark side and installed the latest version ofIE7.

  7. Scott Hillier organisiert auf GotDotNet ein Projekt SharePoint 2007 Features das sich zum Ziel gesetzt

  8. Occasionally, I ask SharePoint professionals, who have done interesting and useful work to post a guest

  9. Okay so I found some great info on this site about presence aware stuff:

  10. Okay so I found some great info on this site about presence aware stuff:

  11. klee says:

    This is a great feature – I used it a few months back to query our AD via a web service and create an employee directory right through a DVWP.  I can provide presence information right from MOSS and a status indicator from our LCS server.  We also have our phone system integrated back to LCS so I can even inject URLs to place a call to the person’s extention or cell phone which is also brought in from AD right from the directory.  One weird bug I’ve noticed is the roll-over menu on the LCS pawn seems to break as you scroll down the page.  The roll-over menu appears below the actual entry and moves further down the page the more you scroll.  Very strange – still haven’t found a fix for it yet.

  12. stansmith78 says:


    I am currently planning to build an employee directory with presence information in our MOSS portal. Some of the approaches I have looked at are: creating a custom list containing user profile information imported into SSP from AD. The only thing is, I haven’t been able to figure out how to create a custom list to hold user profile information. Another alternative is one of the comments left about this article about using a DVWP to display information for a web service that directly queries AD. If someone can suggest some alternatives; or, give me some advice on my present options, it would be greatly appreciated.

    Thank you very much  

  13. Je dérive un peu de mon Axe SharePoint pour m’ouvrir un peu plus sur le Monde IW et dans ce cas, OCS,

  14. maldrak says:


    I have encountered this problem.  Three factors align to cause it: javascript, css, and the ActiveX control that renders the widget.  I won’t try patching the ActiveX control.

    The javascript problem occurs in init.js in the IMNGetOOUILocation or IMNShowOOUI function.  Certain css rules will alter where the ActiveX widget starts counting the oouiY offset from.  To compensate for the problem in javascript, oouiY should be reduced by document.body.parentNode.scrollTop.

    To solve the problem with CSS, I can give the body element static positioning then give relative/absolute positioning to a descendant (form#aspnetForm worked for me).

    Be careful if you muck with the css because MSOLayout_GetRealOffset has problems with some css configurations.  It is used when dragging web parts around the page to reorder them or place them in different zones.  The problem it has is that it ascends the DOM tree by offsetParent and terminates at the body tag.  When your css rules cause the offsetParent to never be the body tag, the loop jumps to the html tag then throws an error looking for the offsetParent.

  15. Amit says:

    Does any one knows if one can embed the NameCtrl ActiveX in a non web application ?

    Any code examples ?

    I need to embed it in a C++ application.



  16. Allyson Kreft says:

    Can IMNRC be used with an Image Web control?

    How do you set the ShowOfflinePawn attribute?

  17. Dale says:

    SharePoint’s default Contact Details web part also displays a job title field…

    Rather than havin to manually input the job title field, is there a way to get IMNRC to auto fill the job title for us?

  18. Akhila says:

    I need to be able to schedule a live meeting from SharePoint. Can the presence menu be used to show a live meeting link , If yes how.



  19. nazakath says:

    I wanted to remove presence from data view webpart… have any solution please share..



Comments are closed.

Skip to main content