# vba to send msg on whatsapp



## kojy86 (Aug 29, 2018)

Hello ,
i have a list of customer codes with mobile numbers and i have created a vba (you can find it below) to send a text msg to every customer after i open whatsapp web and this is working great but i have two issues with this vba
1- i need to attach a pdf file which on my pc
2- if i don't have the customer number in my contact list i need to ignore this number and continue (if there is a solution  to send anyway it will be great)

and this is the vba

Sub Send()
    Worksheets(2).Activate
    Dim lrow As Long
    lrow = Cells(Rows.Count, 1).End(xlUp).Row
    For Each myCell In Worksheets(2).Range("A1:A" & lrow).Cells
    Worksheets(1).Activate
    Worksheets(1).Range("A1") = myCell.Value
Dim text As String
Dim contact As String
text = Range("C1").Value
contact = Range("A2").Value
Fazer (3000)
Call SendKeys("{TAB}", True)
Fazer (1000)
Call SendKeys(contact, True)
Fazer (1000)
Call SendKeys("~", True)
Fazer (1000)
Call SendKeys(text, True)
Fazer (1000)
Call SendKeys("~", True)


startrow = startrow + 1


Next myCell
End Sub
Function Fazer(ByVal Acao As Double)
Application.Wait (Now() + Acao / 24 / 60 / 60 / 1000)
End Function


----------



## kojy86 (Aug 30, 2018)

Any help ????


----------



## aakrutidesign (Mar 23, 2019)

Not download excel sheet


----------



## aakrutidesign (Mar 23, 2019)

please send excel sheet


----------

