Instant messaging using Office Communicator
Office Communicator is an instant messenger client for businesses, similar to AOL Instant Messenger or MSN Messenger. This recipe will show you how to integrate with Office Communicator and send a message to someone through NAV.
Getting ready
Office Communicator must be installed and configured on the client machine.
How to do it...
Create a new C# Class Library project from Visual Studio.
Add the following code to the project:
using System; using CommunicatorAPI; using System.Threading; using System.Runtime.InteropServices; namespace NAVCommunicator { [ClassInterface(ClassInterfaceType.AutoDual)] [ProgId("NAVCommunicator")] [ComVisible(true)] public class NAVCommunicator { CommunicatorAPI.MessengerClass communicator; bool connected = false; public NAVCommunicator() { connected = false; } public bool IsConnected() { return connected; } public void Signin() { if (connected) return; if (communicator == null) { communicator = new CommunicatorAPI.MessengerClass...