Sending SMSs on batch through MPE and Excel
Verfasst: Sa 4. Jan 2025, 13:28
Happy new year to all the geeks!
I herein revive an old subject for which I never ended.
The objective is to automatically send SMSs to multiple recipients based on an excel sheet containing a list of phone numbers and individualized messages.
Let us say that
column 1 contains the phone numbers (from cell A5)
column 2 contains the message to be sent (from B5)
We know (from the following topic https://www.fjsoft.at/forum/viewtopic.php?t=373 link that the appropriate syntax required for MPE is below
"C:\Program Files (x86)\MyPhoneExplorer\MyPhoneExplorer.exe", action=sendmessage savetosent=1 number=+33611236962 text="This is the message to be sent"
and when this command is sent from a DOS windows, it works perfectly.
My concern is that I cannot succeed in sending such a line from an Excel macro
The macro below (between >>>> and <<<<<) is almost operational, but
I am puzzled when finding the appropriate syntax for sending line itself
>>>>>>>>>>
Sub Send_SMS_Via_MPE()
'
'
' this macro should send SMS based
' on the table starting at A5
' given that A5 is the phone number and B5 the message to send
'
Dim a, b As String
Dim x As Integer
For x = 5 To Range("a32000").End(xlUp).Row 'We guess this is enough
a = Cells(x, 1)
b = Cells(x, 2)
' the goal is to elaborate below the command to send
'''''Something like : shell ("C:\Program Files (x86)\MyPhoneExplorer\MyPhoneExplorer.exe, action=sendmessage savetosent=1 number="&a&" text= & b &"))
'Now we wait a little before moving to next line
Application.Wait (Now + TimeValue("00:00:05"))
Next
End Sub
<<<<<<<<<<
Could a VBA guru give me a hand on this point?
Many thanks
Loic
I herein revive an old subject for which I never ended.
The objective is to automatically send SMSs to multiple recipients based on an excel sheet containing a list of phone numbers and individualized messages.
Let us say that
column 1 contains the phone numbers (from cell A5)
column 2 contains the message to be sent (from B5)
We know (from the following topic https://www.fjsoft.at/forum/viewtopic.php?t=373 link that the appropriate syntax required for MPE is below
"C:\Program Files (x86)\MyPhoneExplorer\MyPhoneExplorer.exe", action=sendmessage savetosent=1 number=+33611236962 text="This is the message to be sent"
and when this command is sent from a DOS windows, it works perfectly.
My concern is that I cannot succeed in sending such a line from an Excel macro
The macro below (between >>>> and <<<<<) is almost operational, but
I am puzzled when finding the appropriate syntax for sending line itself
>>>>>>>>>>
Sub Send_SMS_Via_MPE()
'
'
' this macro should send SMS based
' on the table starting at A5
' given that A5 is the phone number and B5 the message to send
'
Dim a, b As String
Dim x As Integer
For x = 5 To Range("a32000").End(xlUp).Row 'We guess this is enough
a = Cells(x, 1)
b = Cells(x, 2)
' the goal is to elaborate below the command to send
'''''Something like : shell ("C:\Program Files (x86)\MyPhoneExplorer\MyPhoneExplorer.exe, action=sendmessage savetosent=1 number="&a&" text= & b &"))
'Now we wait a little before moving to next line
Application.Wait (Now + TimeValue("00:00:05"))
Next
End Sub
<<<<<<<<<<
Could a VBA guru give me a hand on this point?
Many thanks
Loic