Skip to content

Free Excel Training 2022

Excel Training Tutorials 2022

  • Home
    • About
    • Contact
    • Privacy Policy
  • Excel Essentials
  • Excel Functions
    • Excel 2003
    • Excel 2007
    • Excel 2010
  • Excel in Hindi
  • Excel VBA
    • Excel 2003 VBA
    • Excel 2007 2010 2013 VBA
  • YouTube
    • YouTube Advanced VBA
    • YouTube Hindi
  • Books
  • What’s New

Month: January 2021

Whatsapp Desktop Automation with VBA

Posted on January 14, 2021January 14, 2021 by Dinesh Kumar Takyar

How to automate Whatsapp Desktop to login, search for user, send message and attachment and logout.

Watch the video below:

Whatsapp Desktop Automation with VBA

Here’s the complete macro or VBA code:
Option Explicit
Dim driver As New WebDriver
Sub LoginSearchUserSendMessageAttachmentViaWhatsapp()
‘Chrome Driver
‘Selenium
‘Selenium Wrapper

Dim keys As New SeleniumWrapper.keys
Dim filepath As String

filepath = “C:\exceltrainingvideos-12\find-header-with-todays-date.xlsm”

driver.Start “chrome”
driver.Get “https://web.whatsapp.com/”
driver.Window.Maximize

driver.Wait 5000

‘driver.Wait 2000
driver.FindElementByXPath(“//span[@title = ‘Dt’]”).Click
driver.Wait 1000
driver.SendKeys (keys.Tab + keys.Tab)
driver.Wait 1000
driver.SendKeys (“Poonam Mobile”)
driver.Wait 1000
driver.SendKeys (keys.Enter)

driver.FindElementByClass (“_3FRCZ”)
driver.SendKeys (“Please study the below attached file for the class tomorrow.”)
driver.Wait 1000
driver.SendKeys (keys.Enter)

driver.Wait 2000
driver.FindElementByXPath(“//div[@title=’Attach’]”).Click

driver.Wait 10000
driver.FindElementByXPath(“//input[@accept=’image/*,video/mp4,video/3gpp,video/quicktime’]”).SendKeys (filepath)

driver.Wait 2000 ‘ this wait time depends on the size of your file max 64 mb
driver.FindElementByXPath(“//span[@data-icon = ‘send’]”).Click

driver.Wait 1000
driver.FindElementByXPath(“//div[@title = ‘Menu’]”).Click
driver.FindElementByXPath(“//div[@title=’Log out’]”).Click

driver.Quit

End Sub

How to automate Whatsapp Desktop

Posted in Excel VBATagged search for user in whatsapp using vba, send message via whatsapp using vba, sign in whatsapp with vba, Whatsapp Desktop Automation with VBA 1 Comment

Posts navigation

Older posts
Newer posts

Change Language

en English
af Afrikaanssq Albanianam Amharicar Arabichy Armenianaz Azerbaijanieu Basquebe Belarusianbn Bengalibs Bosnianbg Bulgarianca Catalanceb Cebuanony Chichewazh-CN Chinese (Simplified)zh-TW Chinese (Traditional)co Corsicanhr Croatiancs Czechda Danishnl Dutchen Englisheo Esperantoet Estoniantl Filipinofi Finnishfr Frenchfy Frisiangl Galicianka Georgiande Germanel Greekgu Gujaratiht Haitian Creoleha Hausahaw Hawaiianiw Hebrewhi Hindihmn Hmonghu Hungarianis Icelandicig Igboid Indonesianga Irishit Italianja Japanesejw Javanesekn Kannadakk Kazakhkm Khmerko Koreanku Kurdish (Kurmanji)ky Kyrgyzlo Laola Latinlv Latvianlt Lithuanianlb Luxembourgishmk Macedonianmg Malagasyms Malayml Malayalammt Maltesemi Maorimr Marathimn Mongolianmy Myanmar (Burmese)ne Nepalino Norwegianps Pashtofa Persianpl Polishpt Portuguesepa Punjabiro Romanianru Russiansm Samoangd Scottish Gaelicsr Serbianst Sesothosn Shonasd Sindhisi Sinhalask Slovaksl Slovenianso Somalies Spanishsu Sudanesesw Swahilisv Swedishtg Tajikta Tamilte Teluguth Thaitr Turkishuk Ukrainianur Urduuz Uzbekvi Vietnamesecy Welshxh Xhosayi Yiddishyo Yorubazu Zulu

Please click the icon to access all YouTube videos, if you can't see the video on the main page:

View All Posts

View All Pages

Share with Friends:
              

Create a website that's free with GoDaddy!
Proudly powered by WordPress | Theme: sosimple by Fernando Villamor Jr..

Copyright ©2023 exceltrainingvideos.com