Office Communicator Verify – User Status
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 if you want to do a Anonymous Monitoring?
Also Read: Login to Facebook, Twitter, Google+ in IE from Excel
User Status – Without Adding User to Office Communicator
If their Id is not in your Office communicator list & 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.
- 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”.
Public Sub Office_Communicator_Verify_User_Status_OCS() Dim myOCS As New CommunicatorAPI.Messenger 'Office Communicator API Library Dim OCS_User_Mail_ID As String Dim curr_status As Integer Dim flag As Integer Dim stat As String stat = "" OCS_User_Mail_ID = "User@mail.com" 'Change the Mail ID to USER Mail. curr_status = myOCS.GetContact(OCS_User_Mail_ID, myOCS.MyServiceId).Status If 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 = " & stat End Sub
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.
Also Read: WhatsApp Multiple Login Sessions in Same Mobile
Related Topics:
- 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
Hai, What is Lync? Is it a Microsoft Office Product?
Hi ..!! this is awesome stuff… thnks .. however i am getting the status for only those who are on my list.. 🙁 . Can u please guide me where i can be doing wrong?
Is this resolved? If possible please post the solution that you found, so that other readers will be benefited.
When I created a loop, even the person is online, it is showing it as Unknown. But in next iteration it is showing it as available. How to fix this please?
Try to clear the cache before every iteration. So that i does not take any previously stored values.
To clear web cache you can use this command.
Shell “RunDll32.exe InetCpl.Cpl, ClearMyTracksByProcess 11” as mentioned in the comments section of this page https://officetricks.com/download-html-table-to-excel/
But to clear Excel Cache, try to Google. If possible, we can have TeamViewer session to resolve the issue.
I have googled. But couldnt find any useful info. I can’t use team viewer as i am using my office laptop :(. Could you please try it from your end? Thanks!
How to find the total time of a person’s online status in a day, apart from “Away and/or offline”?
Hello i tryied your code but ist still shows as value Unknown (curr_status=0) can you pls fix it or you can make a macro file and upload ??