From: johankotze on
I'm using Outlook 2007. Outlook 2007 provide me function of sending text
messages. I want to automate so that I can send the text message from withing
MS Access the same as I do with sending and email. But I can't get it to work.
The code that I use on the click event of my frmTextMessages send button is
the following. My sms gateway is already setup within Outlook 2007 and is the
as follow as I can already send text messages from Outlook 2007. I want to
automate it with MS Access so that I can send the text message directly from
Access.

SMS gateway
-------------
gateway = https://www.vodacommessaging.co.za/oms/service.asmx
username = johankotze
password = ******
-------------

Code
---------------
Private Sub cmdSend_Click()
'Set the Outlook controls to create a new message
Set OutlookApp = CreateObject("Outlook.Application")
Set OutlookMail = OutlookApp.CreateItem(olTextMessage)

'Set the FROM field
OutlookMail.SentOnBehalfOfName = strFrom

'Set the TO field
If Not IsNull(Me.txtMobileNr) Then
OutlookMail.To = Me.txtMobileNr
End If

'Set the BODY field
OutlookMail.Body = Me.txtMessage

'Show the message to the user
OutlookMail.Send
MsgBox "SMS has been send successfully!"
End Sub
-----------------
I get a debug error at "OutlookMail.Send"

Can someone please help me with

--
Message posted via http://www.accessmonster.com