vba to send msg on whatsapp

kojy86

New Member
Joined
Jun 8, 2011
Messages
15
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
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

Forum statistics

Threads
1,223,702
Messages
6,173,936
Members
452,539
Latest member
delvey

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