我有一个网站API从Access 2010 VBA发送消息。当我按下命令按钮时,Internet Explorer打开并发送邮件。
但是,对于每条消息,都会打开一个单独的选项卡,并且需要一段时间才能发送。我的要求是在不打开Internet Explorer的情况下发送邮件。下面是我的代码:
Function Send_Message()
MemApiKey = "USL"
MemMobNo = "03071913090"
MemMasking = "APIKEY"
MemBody = "This is Test Message"
MemApiKey = "5b873e271974fdf9e3edd85c3dabd22f"
With CodeContextObject
Dim WebLink As String
WebLink = "http://csms.voguetech.com.pk/api_sms/api.php?key=" & MemApiKey & "&receiver=" & MemMobNo & "&sender=" & MemMasking & "&msgdata=Paksuite1"
Application.FollowHyperlink WebLink, , True
WebLink = "http://csms.voguetech.com.pk/api_sms/api.php?key=" & MemApiKey & "&receiver=" & MemMobNo & "&sender=" & MemMasking & "&msgdata=Global Care2"
Application.FollowHyperlink WebLink, , True
End With
End Function这个是可能的吗?
发布于 2019-12-12 23:55:03
我根据注释中的反馈将代码更改为以下代码(删除TRUE参数):
strURL = "http://csms.voguetech.com.pk/api_sms/api.php?key=" & MemApiKey & "&receiver=" & MemMobNo & "&sender=" & MemMasking & "&msgdata=SSS Care Solutions"
Application.FollowHyperlink strURL, , False, False, , msoMethodPost它现在工作得很好。
https://stackoverflow.com/questions/59306587
复制相似问题