I have an issue while sending Whatsapp messages to my customers using excel vba, everything was working fine till I have updated the windows 10, then the code is broken
Option Explicit
Sub WhatsAppMsg()
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(xlUp).Row
For i = 2 To LastRow
strPhoneNumber = Sheets("Sheet1").Cells(i, 1).Value
strMessage = Sheets("Sheet1").Cells(i, 2).Value
ActiveSheet.Shapes(1).Copy
strPostData = "whatsapp://send?phone=" & strPhoneNumber & "&text=" & strMessage
Set IE = CreateObject("InternetExplorer.Application")
IE.navigate strPostData
Application.Wait (Now + TimeValue("00:00:05"))
Call SendKeys("^v")
Application.Wait (Now + TimeValue("00:00:05"))
Call SendKeys("{ENTER}", True)
Next i
End Sub