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

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

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