ActiveXperts
SMS & MMS Toolkit


 Product Overview

 Supported Protocols:
 
 How to use

 Online Samples

 Download (.exe)

 Brochure (.pdf)

 Manual (.htm)

 Release Notes


Support

 Knowledge Base

 Forum

 Contact Support


Purchase

 Licensing

 Pricing

 Order now


Providers

 SMPP Providers

 MMS Providers

 TAP/UCP Providers

 SNPP Providers


Related documents

 Case studies

 SMS Documents

 GSM Network Codes

 TAPI Documents

 About Mobile
 Communications


 AT Commands

 RFC's


  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 SmsProtocolGsm 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 objGsmProtocol 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 objGsmProtocol Is Nothing Then
     Set objGsmProtocol  = CreateObject("ActiveXperts.SmsProtocolGsm")
     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 objGsmProtocol as Object
   Set objGsmProtocol = CreateObject("ActiveXperts.SmsProtocolGsm")

   msgbox(objGsmProtocol.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
  
  objGsmProtocol.Clear
  objSmsMessage.Clear
  
  '################# configure the logfile and the device ##################
    
  'set the logfile
  objGsmProtocol.Logfile = txtLogfile.Value
  
  'select the device
  objGsmProtocol.Device = cbDevice.Value
  
  
  
  '############################ Enter the pincode ##########################
  
  If objGsmProtocol.LastError = 0 Then
      If txtPincode.Value <> "" Then
        objGsmProtocol.EnterPin (txtPincode.Value)
      Else
      End If
  Else
  End If
    
    
    
  '######################## Fill in the message type #######################

  
  If objGsmProtocol.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 objGsmProtocol.LastError = 0 Then
    If cbRequestDeliveryReport = True Then
       objSmsMessage.RequestDeliveryStatus = True
    Else
    End If
  Else
  End If
  
  
  
  '#################### Create and send the message ########################
  
  
  If objGsmProtocol.LastError = 0 Then
    'create the SMS
    objSmsMessage.Recipient = txtRecipient.Value
    objSmsMessage.Data = txtMessage.Value
  Else
  End If
  
  If objGsmProtocol.LastError = 0 Then
    'send the SMS
    objGsmProtocol.Send( objSmsMessage )
  Else
  End If

  
  
  '########################### Get the results ##############################
  
  'get the result
  txtResult.Value = objGsmProtocol.LastError & " : " & objGsmProtocol.GetErrorDescription(objGsmProtocol.LastError)
  
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.

Copyright ©1999-2007 ActiveXperts Software. All rights reserved.