Send MSG from Excel on Whatsapp via Excel VBA Bulk

Send MSG from Excel on Whatsapp via Excel VBA Bulk

?? Send Bulk WhatsApp Messages from Excel using VBA ??

With Excel VBA, you can send WhatsApp messages in bulk using the WhatsApp Web URL method. This allows you to send messages without API access by opening WhatsApp Web automatically.


?? Steps to Send WhatsApp Messages from Excel VBA

? Requirements:

?? WhatsApp Web must be logged in on your browser ?? Excel file with contacts & messages


?? Step 1: Prepare Your Excel Sheet

Create a sheet (Sheet1) with the following structure:

A (Phone Number) B (Message) 919876543210 Hello, this is a test msg! 918765432109 Your order is ready!


?? Step 2: Write VBA Code to Send WhatsApp Messages

This VBA script opens WhatsApp Web, fills in the message, and sends it automatically.

Sub SendWhatsAppMessages()
    Dim ws As Worksheet
    Dim lastRow As Long, i As Long
    Dim phoneNumber As String, message As String
    Dim url As String
    
    Set ws = ThisWorkbook.Sheets("Sheet1") ' Change sheet name if needed
    lastRow = ws.Cells(ws.Rows.Count, 1).End(xlUp).Row ' Find last row

    For i = 2 To lastRow ' Loop through contacts
        phoneNumber = ws.Cells(i, 1).Value
        message = ws.Cells(i, 2).Value
        message = WorksheetFunction.EncodeURL(message) ' URL Encode message

        ' WhatsApp Web URL format
        url = "https://api.whatsapp.com/send?phone=" & phoneNumber & "&text=" & message

        ' Open WhatsApp Web
        ActiveWorkbook.FollowHyperlink url

        ' Wait for WhatsApp Web to load before moving to the next contact
        Application.Wait Now + TimeValue("00:00:03")
    Next i

    MsgBox "All messages sent!", vbInformation, "Success"
End Sub
        

?? Step 3: Run the Macro

1?? Press ALT + F11 to open VBA Editor 2?? Insert → Module → Paste the VBA code 3?? Close the Editor and go to Excel 4?? Press ALT + F8 → Select SendWhatsAppMessages → Run





watch full videos



?? How It Works?

? The script reads phone numbers & messages from Sheet1 ? It opens WhatsApp Web for each number ? It auto-fills the message (User must press "Send" manually) ? Waits 3 seconds before moving to the next number


? Advanced: Auto-Send Without Click

To automatically click the send button, use SendKeys:

Application.SendKeys "{ENTER}"
        

Modify the script:

    ' Wait for WhatsApp Web to load
    Application.Wait Now + TimeValue("00:00:03")

    ' Auto-send message
    Application.SendKeys "{ENTER}", True
        

?? Things to Note

?? Works without API approval (No paid API required) ?? Cannot send media files (images, PDFs) ?? Browser popup may require user confirmation ?? If WhatsApp Web is not logged in, the user must log in manually


?? Summary

? Bulk WhatsApp Messaging from Excel ? No API required (Uses WhatsApp Web) ? Works with phone numbers from Excel ? Can be modified to include attachments & automation

please call +91880225793388 (sujit sir)



















要查看或添加评论,请登录

Sujit Kumar Singh的更多文章

社区洞察

其他会员也浏览了