Excel to Whatsapp message

Jagat Pavasia

Active Member
Joined
Mar 9, 2015
Messages
359
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

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
 
Upvote 0

Forum statistics

Threads
1,215,576
Messages
6,125,633
Members
449,242
Latest member
Mari_mariou

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