Hello, I have an excel file that is updated automatically from some websites. This files contains products prices. I want to send automatically an email when the price drop under a value. Is there a way How to send email using VBA Excel?How to Send Email in Excel Using VBA? Thanks for your help
here is the code if you need to check if a printer is connected to nework: Set objWMIService = GetObject("winmgmts:\\.\root\cimv2") Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_Printer WHERE Name = 'HP DeskJet 2720E'") For Each objItem in colItems If objItem.Network = True Then WScripRead more
here is the code if you need to check if a printer is connected to nework:
[crayon-6764089b9ba9d780624259/]
This script uses the Windows Management Instrumentation (WMI) service to query for printers with the name “HP DeskJet”. It then checks the value of the Network
property for each printer to determine whether it is connected to the network. If the Network
property is True
, the script outputs a message indicating that the printer is connected to the network. If the Network
property is False
, the script outputs a message indicating that the printer is not connected to the network.
I hope this helps!
See less
Hello, You need to give access Outlook with VBA, you need to activate the Microsoft Outlook Object Library. To activate it, go to Tools in the VBA editor > References. Activate Microsoft Outlook 16.0 Object Library : Then in a module use this subroutine: Sub sendAnEmail(ByRefRead more
Hello,
You need to give access Outlook with VBA, you need to activate the Microsoft Outlook Object Library.
To activate it, go to Tools in the VBA editor > References.
Activate Microsoft Outlook 16.0 Object Library :
Then in a module use this subroutine:
[crayon-6764089c20809217060146/]
To test the code, call this code using a buton:
[crayon-6764089c2080c256399212/]
Test:
I hope this will help you.
Good luck!
See less