Download ActiveXperts SMS and MMS Toolkit 5.1  (6826 KB - .exe file)
Download Manual  (623 KB - .htm file)
Using The SMS and MMS Toolkit with Visual Basic for Applications
The SMS and MMS Toolkit is a software development kit (SDK) to enhance an application or script with SMS, MMS and Pager functionality.
An SMS messages can be sent using a GSM/GPRS modem, an SMPP provider, an HTTP compliant SMS provider or using a standard dialup or fixed-line SMS modem.
An MMS messages can be sent via a GSM/GPRS modem (MM1), an SMTP server (MM4) or an XML/SOAP compliant provider (MM7).
SMS features:
- Send and receive numeric- and alphanumeric text SMS messages
- Verify delivery of outgoing SMS messages
- Support for multimedia SMS messages, including ringtones, pictures and logo's
- Support for WAP Push, WAP Bookmarks, vCards, voicemail/e-mail/fax/MMS indications
- Support for Unicode, to support foreign languages like Chinese, Turkisch, etc.
- Support for multi-part messages, to allow messages longer than 160 characters
- Support for GSM modems, GSM phones, SMS/HTTP providers, SMPP (Short Message Peer to Peer) providers, TAP/XIO and UCP dial-in SMSC providers
- Support Multi-threading environments. The component is thread-safe, which means it can be used in a multi-threaded environment
- Samples included for various development platforms: MS Visual Basic, MS Visual Basic .NET, MS Visual C++, MS Visual Studio C# .NET, ASP, ASP .NET, Borland Delphi, Borland C++ Builder, ColdFusion and more
MMS features:
- Support for many multimedia formats incl.: JPG, GIF, PNG, BMP, WBMP, TIF, WAV, MP3, MIDI, AC3, GP3, AVI, MPG, MP4, VCARD, VCALENDAR, JAR and more
- Support for MM1 (MMS over WAP), MM4 (MMS over SMTP) and MM7 (MMS over HTML/SOAP)
Pager features:
- Send alpha-numeric Pager messages through SNPP
This document describes how the SMS and MMS Toolkit can be integrated into VBA projects.
Step 1: Download and install The SMS and MMS Toolkit
Download the SMS and MMS Toolkit from the ActiveXperts Download Site and start the installation.
The installation guides you through the installation process.
Step 2: Create a new Excel document
Create the form displayed in the image below. To create the buttons, textarea's and drop down menu's, click "View", "Toolbars", "Control toolbox".

(Click on the picture to enlarge)
Step 3: Fill in the dropdown-menu's
In this sample, we're creating a form that is able to send an SMS in Microsoft Excel. Sending an SMS with our SMS and MMS Toolkit
can be done in just a few lines of code. The core of this little system is the SmsProtocolHttp object witch is the first line of code that
must be typed down in your code. After that, just add the phone-number, the message, tell the system what port the device is
connected to and eventually send the message.
You can configure a lot of extra options. Few of them are used in this sample. More information about those options are to be
found in the products manual whitch is shipped with our product. In this sample we are configuring a logfile, the message
type, we are checking the status of the SMS (Whether it has been sent or not) and we're displaying the modems connected to the
computer.
In this sample we work with forms. It is possible to work with just the fields too. To create an excel file whitch is able to
send an SMS, first of all, create a new excel file with the form that is displayed below in it.

(Click on the picture to enlarge)
A lot of things in this form are optional. Basically you only need the fields mentioned below:
- The device field
- The pincode field
- The recipient field
- The message
Make sure you don't forget to create a submit button.
The first and most important thing is to create the ActiveXperts objects. To do that means we need to type some code. You can add code
to an excel sheet. Click "View", "Toolbars" and then "Control Toolbox". You will see a "Design Mode"-icon ( ), click it. Double
click the submit button you created in your form. The MicroSoft Visual Basic Editor will now be opened. You can type all code here.
The ActiveXperts objects have to be public variables because they are used in different subs. Use the following code for that.
'Declare the object variables
Public objHttpProtocol As Object
Public objSmsMessage As Object
Public objSmsConstants As Object
To fill these variables with the ActiveXperts Software, we're creating a function so in any situation we're sure the object is loaded properly.
Use the following code:
Sub createobjects()
'########################### set the objects ###########################
If objHttpProtocol Is Nothing Then
Set objHttpProtocol = CreateObject("ActiveXperts.SmsProtocolHttp")
Set objSmsMessage = CreateObject("ActiveXperts.SmsMessage")
Set objSmsConstants = CreateObject("ActiveXperts.SmsConstants")
Else
End If
End Sub
In the sample we created a seperate sub for sending the SMS. If the submit button is clicked fist a check is preformed. If the phone number is correct
the SMS will be sent. The objects we've created work with the SMS and MMS Toolkit. Every property of
the toolkit can used with a dot. Every object has its own properties whitch can be found in the products manual that is shipped with the product.
Here is an example of how to call to a property. This script wil print the version of the SMS and MMS Toolkit's version in a messagebox.
Sub createobjects()
Dim objHttpProtocol as Object
Dim objSmsMessage as Object
Set objHttpProtocol = CreateObject("ActiveXperts.SmsProtocolHttp")
Set objSmsMessage = CreateObject("ActiveXperts.SmsMessage")
Set objSmsConstants = CreateObject("ActiveXperts.SmsConstants")
msgbox(objHttpProtocol.Version)
End Sub
To send the SMS we need to collect the information entered the user and use it to send the SMS. When you're writing your script make sure the
script stops if any command has not executed properly. You are able to check this using the "LastError" property in our toolkit. Here is
an example what you could make your script look like.
Sub sendSMS()
'empty some fields in the form
txtStatus.Value = ""
txtStatusRecipient.Value = ""
txtTime.Value = ""
'create the objects
createobjects
objHttpProtocol.Clear
objSmsMessage.Clear
'################# configure the logfile and the device ##################
'set the logfile
objHttpProtocol.Logfile = txtLogfile.Value
'select the device
objHttpProtocol.Device = cbDevice.Value
'############################ Enter the pincode ##########################
If objHttpProtocol.LastError = 0 Then
If txtPincode.Value <> "" Then
objHttpProtocol.EnterPin (txtPincode.Value)
Else
End If
Else
End If
'######################## Fill in the message type #######################
If objHttpProtocol.LastError = 0 Then
'set default
objSmsMessage.Format = objSmsConstants.asMESSAGEFORMAT_TEXT
'unicode multipart messages
If cbAllowMultipartMessages = True Then
objSmsMessage.Format = objSmsConstants.asMESSAGEFORMAT_TEXT_MULTIPART
Else
End If
'unicode imidiate display
If cbImidiateDisplay = True Then
objSmsMessage.Format = 1
Else
End If
'unicode messages
If cbUnicode = True Then
objSmsMessage.Format = objSmsConstants.asMESSAGEFORMAT_UNICODE
'unicode multipart messages
If cbAllowMultipartMessages = True Then
objSmsMessage.Format = objSmsConstants.asMESSAGEFORMAT_UNICODE_MULTIPART
Else
End If
'unicode imidiate display
If cbImidiateDisplay = True Then
objSmsMessage.Format = objSmsConstants.asMESSAGEFORMAT_UNICODE_FLASH
Else
End If
Else
End If
Else
End If
'###################### Request message report ###########################
If objHttpProtocol.LastError = 0 Then
If cbRequestDeliveryReport = True Then
objSmsMessage.RequestDeliveryStatus = True
Else
End If
Else
End If
'#################### Create and send the message ########################
If objHttpProtocol.LastError = 0 Then
'create the SMS
objSmsMessage.Recipient = txtRecipient.Value
objSmsMessage.Data = txtMessage.Value
Else
End If
If objHttpProtocol.LastError = 0 Then
'send the SMS
objHttpProtocol.Send( objSmsMessage )
Else
End If
'########################### Get the results ##############################
'get the result
txtResult.Value = objHttpProtocol.LastError & " : " & objHttpProtocol.GetErrorDescription(objHttpProtocol.LastError)
End Sub
The SMS and MMS Toolkit is also able to check the status of your SMS. Perhaps is has been sent and maybe it's still on its way.
You can check the status of your SMS using the property "QueryStatus". When you execute this command, the storage location is queried.
So before doing a "QueryStatus" you need to know where this information is stored. In this sample the user is able to select it
himself. Eventually we use the following code to display the status of the SMS:
Private Sub cmdStatus_Click()
'create the objects
createobjects
'select the storage type
Select Case cbStorage.Value
Case "SM - SIM Card"
objHttpProtocol.Storage = objSmsConstants.asSTORAGE_SIM
Case "ME - Device"
objHttpProtocol.Storage = objSmsConstants.asSTORAGE_DEVICE
Case "MT - Any"
objHttpProtocol.Storage = objSmsConstants.asSTORAGE_ALL
Case "SR - Dedicated"
objHttpProtocol.Storage = objSmsConstants.asSTORAGE_REPORTS
End Select
'query the modem to find out the status of the SMS
objHttpProtocol.QueryStatus
If objHttpProtocol.LastError = 0 Then
txtStatus.Value = objHttpProtocol.GetStatusDescription(objHttpProtocol.StatusCode)
txtStatusRecipient.Value = objSmsMessage.Recipient
txtTime.Value = objHttpProtocol.StatusTime
Else
End If
End Sub
There are many working samples included with the product.
You can also find them on the ActiveXperts FTP site: ftp.activexperts-labs.com/samples/xmstoolkit.
The ActiveXperts SMS and MMS Toolkit is a SMS development component (SDK). This control can be used by any Windows development platform,
including Visual Basic .NET, Visual CSharp .NET,
ASP .NET (VB,CS),
ASP,
Visual Basic,
Visual Basic for Applications (VBA),
Visual Studio/Visual C++,
Borland Delphi and
C++ Builder,
PHP,
ColdFusion,
HTML,
VBScript and any other ActiveX/COM compliant platform. The SMS and MMS Toolkit is an ActiveXperts Software B.V. Product.
|