Bulk WhatsApp Sender
Templates VBA

Fully Automated Bulk WhatsApp Sender in Excel

In this article, we have created a Fully Automated Bulk WhatsApp Tool in Excel VBA. Using this tool, you can send bulk WhatsApp text messages as well as images on the WhatsApp. You can use this tool send the Customer Invoices, Employee Salary slips or any other dynamic document snapshots.

Below is the data sheet of this WhatsApp Automation Tool-

 

 

Below is the VBA code to send the dynamic bulk text messages on WhatsApp.

 

Sub Send_Text_To_WhatsApp()

Dim whatsapp_number As String

Dim sh As Worksheet
Set sh = ThisWorkbook.Sheets("Data")

Dim i As Integer

For i = 4 To sh.Range("A" & Application.Rows.Count).End(xlUp).Row

If sh.Range("H" & i).Value <> "Yes" Then '' Check Skip

whatsapp_number = sh.Range("G" & i).Value

ThisWorkbook.FollowHyperlink "https://web.whatsapp.com/send?phone=%2B" & whatsapp_number & "&text=" & _
sh.Range("F" & i).Value & "&app_absent=1&send=1"

Application.Wait (Now() + TimeValue("00:00:08"))

VBA.SendKeys "~", True

Application.Wait (Now() + TimeValue("00:00:01"))

End If

Next i

MsgBox "Process Completed", vbInformation

End Sub

 

To send the Excel range as a snapshot on the WhatsApp we have used the below template in this example-

 

Template Sheet
Template Sheet

 

Below is the code to send the Excel range as a snapshot on WhatsApp-

Sub Send_Image_To_WhatsApp()

Dim whatsapp_number As String


Dim sh As Worksheet
Set sh = ThisWorkbook.Sheets("Data")


Dim tsh As Worksheet
Set tsh = ThisWorkbook.Sheets("Template")

Dim i As Integer

For i = 4 To sh.Range("A" & Application.Rows.Count).End(xlUp).Row

If sh.Range("H" & i).Value <> "Yes" Then 'check skip

whatsapp_number = sh.Range("G" & i).Value


''' Filling the template
tsh.Range("E4").Value = sh.Range("B" & i).Value
tsh.Range("E5").Value = sh.Range("C" & i).Value
tsh.Range("E6").Value = sh.Range("D" & i).Value
tsh.Range("E7").Value = sh.Range("E" & i).Value


ThisWorkbook.FollowHyperlink "https://web.whatsapp.com/send?phone=%2B" & whatsapp_number & "&text=&app_absent=1&send=1"

Application.Wait (Now() + TimeValue("00:00:08"))

tsh.Range("B2:G9").CopyPicture , xlBitmap
Application.Wait (Now() + TimeValue("00:00:03"))
VBA.SendKeys ("^v")
Application.Wait (Now() + TimeValue("00:00:01"))
VBA.SendKeys "~", True

Application.Wait (Now() + TimeValue("00:00:01"))


End If
Next i


tsh.Range("E4:E7").ClearContents

MsgBox "Process Completed", vbInformation

End Sub

Watch the step-by-step video tutorial:

Click here to download the practice file

PK
My Name is PK. I am founder of PK-AnExcelExpert.com. I am a Microsoft Certified Professional. I have more than 12 years of experience in Data Visualization, Excel Automation and dashboard creation. Excel is my passion and I like to do always something innovative in Excel and share it with other people.
https://www.pk-anexcelexpert.com