我正在尝试通过excel宏发送批量WhatsApp消息。但是如果我发送1000条消息,这将花费很长的时间。而且我不能一次发送所有的消息。我该怎么做呢?有可能吗?此外,如果我在计算机上单击另一件事,WhatsApp消息不会发送,WhatsApp就是最有效的。如何解决这些问题:
注意:我使用的是WhatsApp桌面应用程序。
这是我正在使用for循环执行的代码的一部分:
Set IE = CreateObject("InternetExplorer.Application") 'Create object IE
IE.navigate "whatsapp://send?phone=" & phone & "&text=Dear " & Sheet1.Cells(rowcount, 1) & vbLf & " " & mesaj 'Send message "something" to this phone (Brazil)
Application.Wait Now() + TimeSerial(0, 0, 2) 'ok just one wait and sendkeys
If pic <> "" Then
Call SendKeys("^v")
Application.Wait Now() + TimeSerial(0, 0, 1)
End If
SendKeys "~"
'IE.Quit 'The navigate already kills the IE
Set IE = Nothing 'Clear the object
发布于 2021-01-29 06:30:20
转到搜索框并按电话号码输入联系人,不要使用URL send?phone=" & phone & "&text=
Dim phone as long
Dim message as string
Dim i as long
Set IE = CreateObject("InternetExplorer.Application") 'Create object IE
IE.navigate "https://web.whatsapp.com/"
Application.Wait(Now + TimeValue("0:00:15"))
for i= 1 to 5
phone= cells(i,"A")
message= cells(i,"B")
SendKeys("{TAB}", True)
SendKeys("{TAB}", True)
SendKeys(phone, True)
SendKeys("~", True)
SendKeys(message, True)
SendKeys("~", True)
Application.Wait(Now + TimeValue("0:00:03"))
Next
请接受回答。
发布于 2021-01-26 02:57:32
群发一次只能发送一条消息给所有人。我也有一个模范的实践,你可以检查它,如果你想。Whatsapp使用桌面在3到6秒内发送消息。Case study link
https://stackoverflow.com/questions/65817485
复制相似问题