Is the person available at his desk?
Office Communicator display list of Friends added in it along with their availability status (whether they are available at their desk, away, Idle or away).
But to check this, they should be first added to Communicator. What is you want to do a Anonymous Monitoring?
Check User Status Without Adding them to MS Communicator List
If they are not in your communicator list and you want to know the status (provided they have login account), the steps explained below can be used with Excel VBA. To get this we need their Communicator Login Id or Email ID.
Visual Basic12345678910111213141516171819Public Sub User_Status_OCS()Dim myOCS As New CommunicatorAPI.Messenger 'Office Communicator APIDim OCS_User_Mail_ID As StringDim curr_status As IntegerDim flag As IntegerDim stat As Stringstat = ""OCS_User_Mail_ID = "User@mail.com" 'Change the Mail ID to USER Mail.curr_status = myOCS.GetContact(OCS_User_Mail_ID, myOCS.MyServiceId).StatusIf curr_status = 34 Then stat = "Away"If curr_status = 10 Then stat = "Busy"If curr_status = 18 Then stat = "Idle"If curr_status = 1 Then stat = "Offline"If curr_status = 2 Then stat = "Online"If curr_status = 0 Then stat = "Unknown"MsgBox "User:" & OCS_User_Mail_ID & " OCS Status = " & statEnd Sub
- Create a New Excel Workbook.
- Press Alt + F11 to activate VB Editor.
- Go to Menu Tools -> Reference and Add “Microsoft Office Communicator API Library“. To use this code, Office Communicator should be installed in the system and a valid user login is required.
- Copy paste the code and run the code by pressing F5 key.
- Message box will pop up to display the user status for the User id provided in “OCS_User_Mail_Id”.
If you have list of Mail IDs in an excel sheet, the above code can be customized to read the list in a loop and get status of each user. The same code can also be used for Friends already added to in Friends list.
- With a Timer enabled along with this, the code can be made to run repeatedly and User’s available time at his desk or Office Communicator can be calculated. i.e., this code along with “Application.OnTime” functionality, can be used as a productivity calculator software. (Reference for adding Timer to Excel Macro)
- When we have list of Email Ids in Excel and want to send mail though Office Outlook to that list, refer this topic
More Tips: Remove Duplicate Values From Excel Sheet
Find Availability Status of User in MS Office Communicator