Send SMS with VBA (1 Viewer)

Reflex_ht

Registered User.
Local time
Today, 10:46
Joined
Sep 11, 2012
Messages
64
Hy,

This is geting me nutts :banghead:

I wrote a samll VBA in Outlok to send SMS messages over a ActiveSync connection beewten the Exchange server and a Phone.

The code:

Code:
Option Explicit
Option Compare Text

Sub Send_SMS(An As String, Nachricht As String)
Dim olBody As String
Dim objSMS As Outlook.MobileItem
Dim MyRec As Outlook.Recipient

Set objSMS = CreateItem(olMobileItemSMS)
Set MyRec = objSMS.Recipients.Add(An)

'MyRec.Resolve
'If MyRec.Resolved = True Then
        objSMS.Body = "Die Status Funktion ist bei dieser SMS fehlgeschlagen: " & Nachricht
        objSMS.Display
        objSMS.Send (True)
        
'End If

        
End Sub

Everithing is working fine wehen I display the Message and push the SEND button. But if I try to do it automaticaly with the VBA Outlook shows me that the recipient can´t be rekognised :( even than if i push the SEND button the message is send. Tryed the Resolve funktion but without succes :(

Even Saving the Phone Nummber in the contacts doesnt help :(

Does someone have expirienc here?
THX
 

Users who are viewing this thread

Top Bottom