ISendMessage Method: SendMessageToUser

SendMessageToUser
(
 UserName  As  String,
 Message  As  String,
 [SourceComputerName As  String]
);

Parameters

[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.

Description
Sends message to the specified user.

Example

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