VBA

Many people spend most of the day either working on SAP-related systems or on Microsoft Office products.   We have created a VBA macro that creates messages on EMSE for those individuals who work with Excel and Word. This macro is based on ESME's REST API .

The macro pops up in your Office tool of choice which allows you to enter a quick message for ESME.

To authenticate themselves, ESME users must replace “insert_your_token“ with their own authorization token. Tags are currently hard-coded as well.

Sub ESME_sendMessage()

‘HTTP variable Dim myHTTP As MSXML2.XMLHTTP

‘HTTP object Set myHTTP = CreateObject(”msxml2.xmlhttp”)

‘open the connection myHTTP.Open “post”, _ “[http://api.esme.us/esme/api/login?token=insert_your_token |http://api.esme.us/esme/api/login?token=[insert_your_token]]“, False

’send myHTTP.Send

‘ Send Message

Dim message

message = InputBox(”Enter Message”)

myHTTP.Open “post”, _ “http://api.esme.us/esme/api/send_msg?message =” + message + “&tags=Test,excel&via=excel”, False

’send myHTTP.Send

‘Logout myHTTP.Open “get”, _ “http://api.esme.us/esme/api/logout “, False

’send myHTTP.Send End Sub