使用VBA通过VoipBuster发送短信

问题描述:

我是初学者,但我试图在条件完成时使用VoipBuster平台在VBA中发送短信。使用VBA通过VoipBuster发送短信

可能吗?使用安装在PC或网页上的应用程序更容易吗(https://www.voipbuster.com/sms)。

请帮忙!

+0

与voipbuster.com只检查其中他们给你的API调用从Excel发送短信的功能。 – 2013-03-28 10:40:09

+0

嗨桑托斯,在网络上我看到,这是可能的,但我无法弄清楚究竟找... – maximladus 2013-03-28 10:49:31

对于来自voipbuster发送短信,您可以通过PHP瓦尔发送...
" https://www.voipbuster.com/myaccount/sendsms.php?username= $USER&password=$PASS&from=$FROM&to=\"$TO\"&text=$SMS_TEXT"

所以,你需要从这样的VBA访问IEXPLORE,创建你乏使用,传递,文本ETCC和CONCAT everythins如URL之前..

从VBA调用IEXPLORE,你会发现有很多与谷歌的方式,在这里你有一个例子

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" 
+0

如何与谷歌浏览 – Deb 2018-02-22 12:04:34

试试下面的代码。您也可以通过将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 Sub 
+0

桑托斯使用它,我得到这个错误:自动化错误(错误440)或系统错误:02146697202,有什么不对?并突出显示“xml.send” – maximladus 2013-03-28 12:46:50

+0

https://www.voipbuster.com/myaccount/sendsms.php?username="test"&password="test"&to="9999999999"&text="Hello“请用正确的方式替换详细信息并直接放入您的浏览器并让我知道答案。 – 2013-03-28 12:48:32

+0

我无法访问这个,因为我在工作并限制访问,我会在稍后让你知道,谢谢!我可以问你是否在行“URL =”是否需要更换密码=和其他与我用于登录和短信的实际的? – maximladus 2013-03-28 12:51:59