Excel to Whatsapp message

Jagat Pavasia

Active Member
Joined
Mar 9, 2015
Messages
406
Office Version
  1. 2021
Platform
  1. Windows
My A1 have heading of "PhoneNumber".
My Raw from A2 have mobile numbers start with India country code, for example : 919898252526

My B1 have heading of "Message".
And my B2 have message to send.

I want to send automatically message on all mobile number in WhatsApp.

I have PC application of WhatsApp also.

please help me.

I have found VBA macro somewhere in google but it did not work for me.

I have attached VBA below :




thank you..




VBA Code:
Sub whatsappMessage()

Dim LastRow As Long
Dim i As Integer
Dim strip As String
Dim strPhoneNumber As String
Dim strMessage As String
Dim strPostdata As String
Dim IE As Object

LastRow = Range("A" & Rows.Count).End(x1Up).Row

For i = 2 To LastRow
 
   strPhoneNumber = Sheets("data").Cells(i, 1).Value
   strMessage = Sheets("data").Cells(i, 2).Value
 
   srepostdata = "whatsapp://send?phone=" & strPhoneNumber & "&text=" & strMessage
   Set IE = CreateObject("chrome.application")
   IE.navigate strPostdata
   Application.Wait Now() + TimeSerial(0, 0, 5)
   SendKeys "~"
 
   Next i
 
 


End Sub
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
 
Upvote 0

Forum statistics

Threads
1,223,901
Messages
6,175,277
Members
452,629
Latest member
SahilPolekar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top