Sending Text Message to Mobile Phone from Access 2010 Application

I have developed an Access Database application that includes Names, Email Addresses, Mobile Phones etc.....
I use the code shown below (please scroll) to launch Outlook 2010, and provide the Email Address and pre determined text and subject.  The user then Clicks "Send" in outlook to send the message.

I want to use to send the same message to a Mobile Phone (from the database).  If you click this Link and watch the Demo, all that is needed is to "tell" Outlook to send this message as a text Message instead on an Email message.

Question:  How to I modify the ACCESS VBA code shown below, so that the user does not have to manually select "Text Message", before clicking "Send"?

Dim objOutlook As Outlook.Application
Dim objOutlookMsg As Outlook.MailItem
Dim objOutlookRecip As Outlook.Recipient
Dim objOutlookAttach As Outlook.Attachment

          Dim dbs As Database
          Set dbs = CurrentDb

          ' Create the Outlook session.
          Set objOutlook = New Outlook.Application

          ' Create the message.
          Set objOutlookMsg = objOutlook.CreateItem(olMailItem)

          With objOutlookMsg
              ' Add the To recipient(s) to the message.
                Set objOutlookRecip = .Recipients.Add(strEmailTo)
                objOutlookRecip.Type = olTo

            If Not IsNull(strEmailSubject) And strEmailText <> "" Then
             ' Set the Subject, Body,
                .Subject = strEmailSubject
            End If
            If Not IsNull(strEmailText) And strEmailText <> "" Then
                .Body = strEmailText & vbCrLf & vbCrLf
                .Importance = olImportanceHigh  'High importance
            End If

             ' Resolve each Recipient's name.
            For Each objOutlookRecip In .Recipients


        End With
        Set objOutlook = Nothing
Exit Sub

Thanks for your help!
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
Instead of:

    ' Create the message.
          Set objOutlookMsg = objOutlook.CreateItem(olMailItem)

it would be:

 Dim myMobileItem As Outlook.MobileItem
 Set myMobileItem = objOutlook.CreateItem(olMobileItemSMS)


 myMobileItem.Body = "Text message was created by OM!"


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Christopher Jay WolffWiggle My Legs, OwnerCommented:
You could code it with using  the regular menu.  This can be done in similar manner to what is shown in this link.

To get correct syntax you may want to run the "go list my controls" subs like...

where you scroll down to "Executing built-in commands" and it may vary some depending on which Outlook you have.
Biggles1Author Commented:
Thanks Jim

This is a simple and straightforward solution and seems to work so far.

Do you recommend an SMS Service in particular?  The one I'm using "My MessageMedia" is not working as its supposed to!

Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
Sorry, have never worked in this area, so have no recommendations on providers.

Biggles1Author Commented:
I did get it to work!  Thanks anyway.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.