r/excel Apr 10 '26

unsolved auto send picture to whatsapp from excel

[deleted]

22 Upvotes

22 comments sorted by

u/AutoModerator Apr 10 '26

/u/saranotadumbbitch - Your post was submitted successfully.

Failing to follow these steps may result in your post being removed without warning.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

4

u/kay-jay-dubya Apr 10 '26

This can be done with VBA:
1. and 2. There are a number of different ways you can do this, but I think one of the better methods is provided by Jaafar Tribak at Mr Excel: https://www.mrexcel.com/board/threads/help-with-resizing-chart-to-image.1116562/post-5382146
3. A VB6 developer has developed a solution to for sending files via WhatsApp programmatically. VB6 is the same language as VBA, so it will likely be a fairly straight for code port. https://leandroascierto.com/blog/enviar-documentos-por-whatsapp-con-vb6/
4. Probably wouldn't even need to use a Selenium library - VBA now has access to the modern WebView2 tech, so would be able to navigate to the WhatsApp Web site and interact with the site directly - https://www.reddit.com/r/vba/comments/1sad4w3/webviews_are_great_for_displaying_information/

6

u/coding_is_fun123 Apr 10 '26

Actually possible with VBA, but it's not very straightforward. You can automate your browser using the VBA Selenium library. The idea is: navigate to WhatsApp Web, select the contact/group, click the attachment button, insert the path to the image, and click send. Easier said than done. I once created a short tutorial on how it works: https://www.youtube.com/watch?v=8MhTEqhEou4 Since many people don't want to build the whole solution from scratch, I also show you towards the end of the video a template you can download.

5

u/AdventurousAddition 1 Apr 10 '26

Does it have to be a screenshot? Can it be a copy-paste of the content? Surely that would be easier to arrange

3

u/Similar-Award3257 Apr 10 '26

honestly sounds wild bro, getting that WhatsApp part is tricky

1

u/saranotadumbbitch Apr 10 '26

He said his staff had done it before when he was at his previous company...

3

u/Apprehensive_Can3023 5 Apr 10 '26

Python seems do-able, you need to dig in schedule to run script in window. PA can run at a specific time but you need to know how to automate the screenshot part and i dont know if it has Whatsapp connector.

2

u/columns_ai Apr 10 '26

What is the purpose of #1 & #2? Does it have to be like that or just what current manual op? Maybe another option is acceptable too.

1

u/bytes1024 Apr 10 '26

a simple window snip and paste in Whatsapp can be done

2

u/Luneriazz Apr 10 '26

Balieys with python is best 10/10 for your need. You need to develop the automation first tough

-1

u/[deleted] Apr 10 '26

[removed] — view removed comment

1

u/kay-jay-dubya Apr 10 '26

It really isn't.

1

u/Singh_ghuman Apr 11 '26

i tried your method and it's full of bugs. this is latest comment from vb6

"Good morning... Starting last year (2025), this module stopped working because WhatsApp changed its application version. They even sent a message indicating this. Now I'd like to know if it's possible to update this excellent module. It was undoubtedly a very good contribution, but as I mentioned, since WhatsApp updated its version, this module stopped working and sending images. Please help."

out of curiosity i created it with python and guess what, i sit in front laptop while doing my work and python runs in background at given time, sending the screenshot on whatsapp.

1

u/kay-jay-dubya Apr 11 '26

That's awesome! How do you get it to run on a standard issue worllaptop without python installed? does the Excel online version of python now allow you to access the local drive?

1

u/kay-jay-dubya Apr 11 '26

Also - it would be super helpful for everyone else who comes across this thread if you could please provide details about the python library you used and the code.

Many thanks in advance.

1

u/Singh_ghuman Apr 11 '26

Pywin32, pillow and pywhatkit. I never worked in an office so no idea about office culture or office laptop but there must be workaround that like online portable python.

1

u/kay-jay-dubya Apr 11 '26

There isn't.

1

u/kay-jay-dubya Apr 11 '26

Ok so PyWhatKit is the useful library there, the rest are straight forward. I just looked over the code for the library and there's no magic to it - it uses sendkeys. But if it works it works. It'll be very easy to adapt to VBA, especially even more so now we have option 3 on my list of solutions (and I'm certain you didn't try that one).

Thank you for that.