I am having a VBA, Added to my outlook, which sends message over Lync. The Script is as given below.
Sub sendIM(toUsers As Variant, message As String)
Dim msgr As CommunicatorAPI.IMessengerConversationWndAdvanced
'Open messenger window and send message!!!!!
Set msgr = messenger.InstantMessage(toUsers)
msgr.SendText (message)
Set msgr = Nothing
It works fine. If there are 10 users, in the toUsers variable, then it sends the message to all as a "Group".
What i want is, if there is a user who is offline, I would like to get some notification that the person is not online. The Messenger displays "Error", saying "Cannot invite "n" people to join the meeting".
Can I get some status, which returns me details of all the users, whom the message was not sent?
You're going about this the wrong way... Rather than creating your distribution list and then looking for exceptions, look to see who is online and send the message to just those folks.
The following two functions will return an array of all your Lync contacts with their current status. Use the array to target who gets included in your message.