我完全是初学者,但我正在尝试使一个宏在VBA发送短信使用VoipBuster平台时,一个条件是完成。
有可能吗?是否更容易使用安装在PC上的应用程序或网页(https://www.voipbuster.com/sms)。
请帮帮我!
发布于 2013-03-28 19:03:28
从voipbuster发送短信,你可以通过php vars发送。
"https://www.voipbuster.com/myaccount/sendsms.php?username=$USER&password=$PASS&from=$FROM&to=\"$TO\"&text=$SMS_TEXT"
因此,您需要像这样从vba访问iexplore,创建您的var,使用、传递、文本etcc和连接所有内容,如前面的URL。
要从VBA调用iexplore,您会发现使用google有很多方法,这里有一个示例
Private Sub IE_Autiomation()
Dim i As Long
Dim IE As Object
Dim objElement As Object
Dim objCollection As Object
' Create InternetExplorer Object
Set IE = CreateObject("InternetExplorer.Application")
' You can uncoment Next line To see form results
IE.Visible = False
' Send the form data To URL As POST binary request
IE.Navigate "https://www.voipbuster.com/myaccount/sendsms.php?username=$USER&password=$PASS&from=$FROM&to=\"$TO\"&text=$SMS_TEXT"发布于 2013-03-28 19:39:17
试试下面的代码。您还可以通过将URL变量中的值放入浏览器进行测试。
Sub SendSms()
Dim username As String
Dim password As String
Dim sendTo As String
Dim msg As String
username = "test" 'enter username here
password = "test" 'enter password here
sendTo = "9999999999"
msg = "Hello"
Dim URL As String
URL = "https://www.voipbuster.com/myaccount/sendsms.php?username=" & username & "&password=" & password & "&to=" & sendTo & "&text=" & msg
Dim xml As Object
Set xml = CreateObject("MSXML2.XMLHTTP")
xml.Open "GET", URL, False
xml.send
End Subhttps://stackoverflow.com/questions/15679602
复制相似问题