Clebergyn 21/5/2022, 15:21
Bom dia
No Access, é mais ou menos por ai
Application.FollowHyperlink "https://api.whatsapp.com/send?phone=55" & Nz(Me.whatsapp) 'para aplicativo
Application.FollowHyperlink "https://web.whatsapp.com/send?phone=55" & Nz(Me.whatsapp) 'para whatsap web
tente assim
- Código:
dim f, m as string
f=me.fone: m= me.mensagem
Shell "c:\Program Files\Google\Chrome\Application\chrome.exe" & " https://wa.me/" & f & "?text=" & m
Segue o codigo completo, tente assim
- Código:
Function FEnviaZap()
Dim rs As DAO.Recordset, tx, m As String, f As Variant, g As String ' fechar guia sendkeys "^(w)" Control + W
m=PlainText(Me.Msg) ' Mensagem do campo mensagem
f = rs("fone"): ' fone para onde vai enviar
Shell "c:\Program Files\Google\Chrome\Application\chrome.exe" & " https://wa.me/" & f & "?text=" & m
Call Wait(4)
SendKeys "{TAB}": SendKeys "{TAB}": SendKeys "{TAB}": SendKeys "{TAB}": SendKeys "{TAB}":
SendKeys "{TAB}": SendKeys "{TAB}": SendKeys "{TAB}":
SendKeys "{ENTER}"
Call Wait(2)
SendKeys "{TAB}": SendKeys "{TAB}": SendKeys "{ENTER}": Call Wait(15): 'SendKeys "{ENTER}"
'SendKeys "{ENTER}": 'SendKeys "^(w)":
'SendKeys "+{TAB}"
End Sub
Function Wait(seconds As Integer) ' pausa tempo em segundos
Dim now As Long
now = Timer()
Do
DoEvents
Loop While (Timer < now + seconds)
End Sub