-1-
-2-
=============================
Dim contact As String
Dim text As String
u = Application.WorksheetFunction.CountA(Sheets(“whatsapp”).Range(“a:a”)) – 2
ActiveWorkbook.FollowHyperlink Address:=”https://web.whatsapp.com”
Application.Wait (Now + TimeValue(“00:00:12”))
For I = 0 To u
contact = Sheets(“whatsapp”).Range(“a2”).Offset(I, 0).Value
text = Sheets(“whatsapp”).Range(“b2”).Offset(I, 0).Value
Call SendKeys(“{TAB}”, True)
Application.Wait (Now + TimeValue(“00:00:05”))
Call SendKeys(contact, True)
Application.Wait (Now + TimeValue(“00:00:05”))
Call SendKeys(“~”, True)
Application.Wait (Now + TimeValue(“00:00:05”))
Call SendKeys(text, True)
Application.Wait (Now + TimeValue(“00:00:01”))
Call SendKeys(“~”, True)
Application.Wait (Now + TimeValue(“00:00:01”))
Call SendKeys(“{TAB}”, True)
Next I
-------------------------------
الكود :
Sub send()
Dim contact As String
Dim text As String
u = Application.WorksheetFunction.CountA(Sheets("whatsapp").Range("a:a")) - 2
ActiveWorkbook.FollowHyperlink Address:="https://web.whatsapp.com/"
Application.Wait (Now + TimeValue("00:00:12"))
For I = 0 To u
contact = Sheets("whatsapp").Range("a2").Offset(I, 0).Value
text = Sheets("whatsapp").Range("i2").Offset(I, 0).Value
Call SendKeys("{TAB}", True)
Application.Wait (Now + TimeValue("00:00:05"))
Call SendKeys(contact, True)
Application.Wait (Now + TimeValue("00:00:05"))
Call SendKeys("~", True)
Application.Wait (Now + TimeValue("00:00:05"))
Call SendKeys(text, True)
Application.Wait (Now + TimeValue("00:00:01"))
Call SendKeys("~", True)
Application.Wait (Now + TimeValue("00:00:01"))
Call SendKeys("{TAB}", True)
Next I
End Sub
-3-
-4-