does anyone know if this is possible?
i was able to succesfully run hyperterminal and use it to开发者_开发问答 send texts through my phone which is attached by USB.
anyone know how to do it in VBA?
If you know the other party e-mail address you can just send e-mail. Otherwise you will need a SMS gateway supplier which can deliver the messages to the correct networks.
Try this:
Public Sub SendSMS(ByVal Recipient As String, ByVal Message As String)
Dim n As Integer
n = FreeFile
' Change the string below if using a different COM port or the port speed
Open "COM1:9600,N,8,1" For Output As #n
Print #n, "<SMS command string>"
Close #n
End Sub
Unfortunately, I don't have a data cable for my phone handy so I can't try it!
Also, be aware that you may not have access to the serial port if you're not running as a privileged user.
精彩评论