Send Message with attachments from Excel to Whatsapp Unsaved numbers | VBA code

Опубликовано: 18 Ноябрь 2024
на канале: Tech ALERT
7,491
131

If you want to send messages from ms excel to whatsapp then this video is for you. In this video, i will teach you how you can send messages using automation from excel to whatsapp on unsaved numbers. In our last videos, you have seen how to send messages on saved contacts but now we will learn how to Send message on UNSAVED NUMBERS from Excel to Whatsapp using VBA code along with attachements. Attachements can be of any type, be it an image, a video or any file.

Excel template : https://drive.google.com/file/d/1OZOK...
Notepad file : https://drive.google.com/file/d/1yPuf...
==========================CODING=========================
Option Explicit
Sub wamsg()
Dim PhoneNumb As String, MsgText As String
Dim LastRow As Long
Dim attach As String, link As String
Dim i As Integer
LastRow = Range("A" & Rows.Count).End(xlUp).Row
For i = 2 To LastRow

With Sheet1
PhoneNumb = .Cells(i, 1).Value
MsgText = .Cells(i, 2).Value
attach = .Cells(i, 3).Value
link = .Cells(i, 4).Value
AppActivate "WhatsApp"
Application.Wait (Now + TimeValue("00:00:03"))
SendKeys "^n", True
Application.Wait (Now + TimeValue("00:00:03"))
SendKeys PhoneNumb, True
Application.Wait (Now + TimeValue("00:00:03"))
SendKeys "{Tab}", True
Application.Wait (Now + TimeValue("00:00:03"))
SendKeys "{Enter}", True
Application.Wait (Now + TimeValue("00:00:03"))
SendKeys MsgText, True

Application.Wait (Now + TimeValue("00:00:03"))
SendKeys "+{Tab}", True
Application.Wait (Now + TimeValue("00:00:03"))
SendKeys "{Enter}", True

If attach = "VIDEO" Then
Application.Wait (Now + TimeValue("00:00:03"))
SendKeys "{Enter}", True
Application.Wait (Now + TimeValue("00:00:03"))
SendKeys link, True
Application.Wait (Now + TimeValue("00:00:03"))
SendKeys "{Enter}", True
Application.Wait (Now + TimeValue("00:00:03"))
SendKeys "{Enter}", True

ElseIf attach = "IMAGE" Then
Application.Wait (Now + TimeValue("00:00:03"))
SendKeys "{Enter}", True
Application.Wait (Now + TimeValue("00:00:03"))
SendKeys link, True
Application.Wait (Now + TimeValue("00:00:03"))
SendKeys "{Enter}", True
Application.Wait (Now + TimeValue("00:00:03"))
SendKeys "{Enter}", True

ElseIf attach = "PDF" Then
Application.Wait (Now + TimeValue("00:00:01"))
SendKeys "{Down}", True
Application.Wait (Now + TimeValue("00:00:01"))
SendKeys "{Down}", True
Application.Wait (Now + TimeValue("00:00:01"))
SendKeys "{Enter}", True
Application.Wait (Now + TimeValue("00:00:03"))
SendKeys link, True
Application.Wait (Now + TimeValue("00:00:03"))
SendKeys "{Enter}", True
Application.Wait (Now + TimeValue("00:00:03"))
SendKeys "{Enter}", True
End If
End With
Next i
End Sub
==========================================================

#techalert #technical #howto

Our social media accounts :

Facebook :   / techalertr  
Instagram :   / techalertr  
Twitter :   / techalertr  
Pinterest :   / techalertr  
Reddit :   / techalertr  
Tumblr : techalertr.tumblr.com

Our Other channels :
1. https://www.youtube.com/c/thesketcher...
2. https://www.youtube.com/c/information...

Join this channel to get access to perks:
   / @techalertr  
==================================================================
Disclaimer : This video is only for educational Purpose. The information provided in this video is for general informational purposes only and should not be considered as professional advice. We make no representations or warranties of any kind regarding the accuracy, completeness, reliability, suitability, or availability of the information presented. Any reliance you place on the information in this video is strictly at your own risk. We are not liable for any loss or damage incurred from the use of this video. Additionally, the inclusion of any links or references does not imply endorsement or responsibility for the content on external websites. Please consult with a qualified professional for personalized advice.
==================================================================Send Message with attachments from Excel to Whatsapp Unsaved numbers, VBA code