ISendMessage Method: SendMessageToUser

 UserName  As  String,
 Message  As  String,
 [SourceComputerName As  String]


[in] String UserName
Name of the user account to which you want to send the message.

[in] String Message
Message string to be sent to the user.

[in] String SourceComputerName
Name of the computer where the send call is to be executed. This parameter is optional. If this parameter is not specified, the call is executed on the current computer.

Sends message to the specified user.


Dim SendMsg As ISendMessage
'Get the ISendMessage interface.
Set SendMsg = CreateObject ("DirectScript.SendMessage.1")
'Send message to John user.
SendMsg.SendMessageToUser "John", "This is test message", "\\MOON"

 See Also