Тёмный

Trigger VBA code every time a new email is received in Outlook. Build out of box functionality 

VBA A2Z
Подписаться 52 тыс.
Просмотров 30 тыс.
50% 1

Опубликовано:

 

4 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 85   
@hubsun
@hubsun 3 года назад
All your videos are brilliant and for me as a non programmer your explanation is clear and simple. All respect for sharing your knowledge.
@VBAA2Z
@VBAA2Z 3 года назад
You're most welcome. Many thanks for your kind words.
@umeshlangade9231
@umeshlangade9231 4 года назад
Thankful to you @VBAA2Z 🙏🙏
@VBAA2Z
@VBAA2Z 4 года назад
You're welcome Umesh.
@notthehelper6289
@notthehelper6289 8 месяцев назад
Thank you for this! Very informative and suprisingly pertinent to the exact project I am working on. This is definitely going to save me a ton of time! Thank you very much!
@VBAA2Z
@VBAA2Z 8 месяцев назад
Glad it was helpful!
@1910hari
@1910hari 4 года назад
You really deserve 100000 Thumb up for your work.
@VBAA2Z
@VBAA2Z 4 года назад
Thanks Hari for your compliment :)
@llvitinhull
@llvitinhull 4 года назад
Amazing content bro! Thanks for sharing your hard work and studies!
@VBAA2Z
@VBAA2Z 4 года назад
I appreciate that!
@roland9923
@roland9923 4 года назад
Excellent thanks as always.
@VBAA2Z
@VBAA2Z 4 года назад
Glad you enjoyed it!
@arjunsr46
@arjunsr46 4 года назад
Awesome tutorial, thank you
@VBAA2Z
@VBAA2Z 4 года назад
Glad it was helpful!
@holieh5301
@holieh5301 4 года назад
Thanks for this useful video.
@VBAA2Z
@VBAA2Z 4 года назад
Glad it was helpful!
@ekilunewmai7033
@ekilunewmai7033 Год назад
Thank you😊
@VBAA2Z
@VBAA2Z Год назад
You're welcome 😊
@victorionescu7653
@victorionescu7653 4 года назад
Great work
@VBAA2Z
@VBAA2Z 4 года назад
Thank you! Cheers!
@R72Investments
@R72Investments 4 года назад
Great tutorial, congratulation! Could you please do a video about how to save the Outlook calender automatically? E.g. save the calender from the entire past week, always run the save every Sunday night at midnight and save the PDF to a certain folder. I would really be interested to learn this :-) thank you so much!
@VBAA2Z
@VBAA2Z 4 года назад
Hi Marcel, sure this possible we'll try and cover or post them to blog soon. Please subscribe for upcoming videos.
@gruanger
@gruanger 2 года назад
I know this is old, but I have a question I have had zero luck finding an answer to. I have a macro I use to do many things and it sends an email. I only use it for certain emails. I want this single macro to send and email, wait for it to show in my sentitems folder, and then save that sent email. The issue is I do not want an eventlistener like this video because it is only for specific emails (not all sent). I have tried loops, sleeping, wait and other things. the problem is, the email sends, but is never received if you do anything else in the vba code while waiting. I legit have no idea how to fix, it is like vba is single threaded and can only do my macro and won't receive the already sent email until my macro finishes, it is super frustrating.
@Brad-fh2vn
@Brad-fh2vn Год назад
thank you Sir
@VBAA2Z
@VBAA2Z Год назад
Most welcome
@linnick9235
@linnick9235 4 года назад
Keep up good work sir. Thanks for this very important video. I’m also interested to learn VBA development from scratch if that’s something in pipeline please let me know.
@VBAA2Z
@VBAA2Z 4 года назад
Glad you liked it. Absolute VBA Developer series will be uploaded soon. Please subscribe and watch out.
@jerzykepinski
@jerzykepinski 2 месяца назад
this is so good
@hsnaamir
@hsnaamir Год назад
Hi, thanks for the video. I have small query, what if we have to use outlook sub folder instead of Default Inbox, how we can use the code [Auto Download]
@victorionescu7653
@victorionescu7653 4 года назад
Can you present this scenario:from an email, drag&drop an excel atachment file over the another excel file and copy data betwen them?
@VBAA2Z
@VBAA2Z 4 года назад
sure we can do that too. We'll cover them in coming videos.
@daddyerl9599
@daddyerl9599 2 года назад
Hello can you help me how to do when I want to highlight text on excel file that has the same subject in my outlook email
@VBAA2Z
@VBAA2Z 2 года назад
sure please check here ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-ji2jHz8YPq8.html
@nirouuchana5757
@nirouuchana5757 3 года назад
Hello man! , This code is cool, i did do it and it worked but , im still stuck when i need to set a folder where i want some emails to go and then extract them from that place
@VBAA2Z
@VBAA2Z 3 года назад
Glad to hear. please check this playlist. ru-vid.com/group/PLo0aMPtFIFDprmb4MBozLAdCn3-1cnnDA
@mks123seenu
@mks123seenu Год назад
Hello Sir - i would like to know the option of replying or saving some attachments through excel based on the conversation id and received date, is it possible?
@VBAA2Z
@VBAA2Z Год назад
yes for that you'll need to add some tracking ID which you can ready using VBA email body
@mks123seenu
@mks123seenu Год назад
​@@VBAA2Z Conversation ID and Email Received Date or Modified date which I am thinking to give a criterion because it is unique in outlook emails...question it should be used in outmail email code?
@jibrankhan4071
@jibrankhan4071 3 года назад
Thank you for such a great video... I have one question... I am logged in on same email address on outlook on multiple devices (home, office, laptop etc) ... can i write a VBA code which if executed on 1 system will automatically replicate on all systems where I am logged in and carry out the functionality ? or do i have to execute VBA code seperately on all outlook sessions? thank you
@VBAA2Z
@VBAA2Z 3 года назад
This event will fire in Outlook where your VBA is located irrespective of account. so your code will have to be dynamically constructed.
@milbrown4346
@milbrown4346 3 года назад
Interesting in that I can’t get any of your code to work. I have typed it letter for letter, space for space and no luck.
@VBAA2Z
@VBAA2Z 3 года назад
May I know if your Macro setting is on? what is the error message your are receiving?
@uclevan1002
@uclevan1002 4 года назад
Oneday , I hope you can create sale reports by VBA
@VBAA2Z
@VBAA2Z 4 года назад
Sure - we'll try to cover more real-life project in coming videos. Please do not forget to subscribe for upcoming videos.
@mainak830
@mainak830 2 года назад
Thank you for the video. However, How are you calling the Sub olItems_ItemAdd? That part is skipping me.
@VBAA2Z
@VBAA2Z 2 года назад
not sure what you mean
@kherratabdesselem6119
@kherratabdesselem6119 3 года назад
hi I would like to congratulate you for the quality of your presentation, but i have a small querry, can we make the vba, to carry the print if we know in advance the extension of the file in the attachement and the body of the email, similaire to quick print Thank you
@VBAA2Z
@VBAA2Z 3 года назад
If you looking to print the attachment on runtime yes you can do that as well.
@hamzehabu-ajameia4418
@hamzehabu-ajameia4418 3 года назад
Thanks for making such useful tutorials, i have used some of you code to extract table contents to excel file but the outlook keeps crashing after performing the macro also excel keeps asking me to confirm pasting the content due to the difference in size when receiving new email.
@VBAA2Z
@VBAA2Z 3 года назад
It is difficult to say without looking at your code. Make sure to clear objects from memory
@kherratabdesselem6119
@kherratabdesselem6119 3 года назад
thank you for the advice, but as i understood, you cannot print if there is no path to the file and the relevant application to open it, most of the attachement i have is in word, and i cannot instruct outlook to open word document and print it
@VBAA2Z
@VBAA2Z 3 года назад
try and keep it simple. save the attachment to your desktop / doc folder, send print command.
@rajeshkp2059
@rajeshkp2059 2 года назад
well this code is not working in Office 365, could you please tell me what tweak needs to be done to work
@VBAA2Z
@VBAA2Z 2 года назад
It should, can you elaborate more? what is not working?
@9901028711
@9901028711 Год назад
Am looking for macro code to auto save all files to specific desktop folder with specific subject line?
@VBAA2Z
@VBAA2Z 10 месяцев назад
you can follow this approach
@mangeshmalvankar5957
@mangeshmalvankar5957 3 года назад
Can this code work whenever we receive multiple emails at same time? I want to run utility as soon as I receive new email, but for multiple emails at same time how can we trigger?
@VBAA2Z
@VBAA2Z 3 года назад
It should work. try and let me know.
@maddinenirajeshbabu3143
@maddinenirajeshbabu3143 4 года назад
Thanks in advance I have one doubt using VBA whenever user login into system can we triggerering an email using VBA
@VBAA2Z
@VBAA2Z 4 года назад
Yes, definitely. there are various ways to accomplish this. Simplest will be have the program files in shell:startup folder, use Task Scheduler, or create a bat file which will load your excel file and run the VBA program. hope it helps.
@Eric-qm4vm
@Eric-qm4vm 2 года назад
Is it possible to share this code? Thank you
@VBAA2Z
@VBAA2Z 2 года назад
Please check this link for projects vbaa2z.blogspot.com/2020/12/you-can-support-vba-a2z-by-simply.html
@Eric-qm4vm
@Eric-qm4vm 2 года назад
@@VBAA2Z Thank you
@bektascanzerkonca8636
@bektascanzerkonca8636 2 года назад
Hello, Thanks for this great tutorial. I want to ask, if this kind of macros (triggered upon email arrival) works also while Outlook is closed? Thanks in advance. @VBA A2Z
@VBAA2Z
@VBAA2Z 2 года назад
Most welcome. Outlook should be running for VBA to Execute
@bektascanzerkonca8636
@bektascanzerkonca8636 2 года назад
@@VBAA2Z Thank you for your answer but I realized that I didn't give enough details. I would like to write a macro same as yours but it should work even if Outlook is not open. So can be the macro triggered on company's mail server, when I recieve some specific E-Mail? The macro should also give an automatic permission because I can not give a permenant permission. Thanks in advance!
@selvan1264
@selvan1264 2 года назад
Thank you for the video :) Do you know how to use excel VBA to reply to specific emails from outlookfolder. For example. Each reply needs to be replied with dear the person's name and contact details, email body with the person name eg. "Thank you for the response...." with the original email string. Much appreciated you help if you can. Thank you!
@VBAA2Z
@VBAA2Z 2 года назад
try something like this Dim olItem As Outlook.MailItem Dim olReply As MailItem ' Reply For Each olItem In Application.ActiveExplorer.Selection Set olReply = olItem.ReplyAll olReply.HTMLBody = "Hello, Thank you. " & vbCrLf & olReply.HTMLBody olReply.Display 'olReply.Send Next olItem
@rameshbalami2075
@rameshbalami2075 3 года назад
Can u help me with the vba to coy the mail body bssed on content?
@VBAA2Z
@VBAA2Z 2 года назад
Please try stackoverflow
@ashishsharma9563
@ashishsharma9563 4 года назад
Is this code for only new mails? And this code will run on the mails which are already there.
@VBAA2Z
@VBAA2Z 4 года назад
Hi Ashish, check the video below. We did detailed tutorials for the same. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-ji2jHz8YPq8.html VBA real-life project from scratch to extract an attachment from outlook to folders. Learn how to: * Connect to outlook using VBA * Activate a specific session * Navigate to any folders within outlook * Search email based on various parameters * Download the attachment to a folder * Design a simple UI to send get parameters * More tips and tricks . . .
@SuperSadgun
@SuperSadgun 4 года назад
Have question I want to send data to everyone with excel sheet but according to outlook username the message has to display in excel hope you understand my thought
@VBAA2Z
@VBAA2Z 4 года назад
You can use userid or full email address to send an email. You can also access the user info attributes from address book. Hope this helps.
@SuperSadgun
@SuperSadgun 4 года назад
@@VBAA2Z no not like that in that excel I have data to all my team members but on the email I'd it has to display the data and rest need to hide I want automate the data to just display only partial data to that user
@VBAA2Z
@VBAA2Z 4 года назад
@@SuperSadgun can you email me some samples data & draft I can take a look at it.
@MrLabuenabarba
@MrLabuenabarba 4 года назад
Do you have something like, In a Public Sharefolder/Mailbox, I need to know who made Category changes on Inbox emails. Hope you can help! =S
@VBAA2Z
@VBAA2Z 4 года назад
I do not have the code ready now but yes it is possible. Access / point to shared email box. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-ji2jHz8YPq8.html it'll be something like this. Dim m As MailItem Set m = arySelection.Item(i) m.Categories = category m.FlagStatus = olFlagMarked m.FlagIcon = 6 m.Save
@MrLabuenabarba
@MrLabuenabarba 4 года назад
@@VBAA2Z Great! Let me take a look :) ... Thank you!
@MrLabuenabarba
@MrLabuenabarba 4 года назад
@@VBAA2Z I've sent you an email.
@bharathkumar.a1040
@bharathkumar.a1040 2 года назад
Itemadd is not working
@VBAA2Z
@VBAA2Z 2 года назад
You can post your questions here stackoverflow.com/
@palakagarwal122
@palakagarwal122 4 года назад
Hi can you please help me with validating the mail id of the incoming mail , if it is a valid mail "xyz@gmail.com" then it should be forwarded to another mail id say "abc@gmail.com"
@VBAA2Z
@VBAA2Z 4 года назад
Sure the incoming email should always be valid. Check below for various options to email. ru-vid.com/group/PLo0aMPtFIFDprmb4MBozLAdCn3-1cnnDA
@VBAA2Z
@VBAA2Z 4 года назад
forword sample here Sub ForwardEmail(item As Outlook.MailItem) Dim oMail As MailItem On Error GoTo Release If item.Class = olMail Then Set oMail = item.Forward oMail.Subject = oMail.Subject oMail.HTMLBody = "sample email body" oMail.Recipients.Add "abc@gmail.com" oMail.Save oMail.Send End If Release: Set oMail = Nothing Set oExplorer = Nothing End Sub
Далее
小路飞嫁祸姐姐搞破坏 #路飞#海贼王
00:45
TRENDNI BOMBASI💣🔥 LADA
00:28
Просмотров 742 тыс.
How to Work With Emails in Outlook VBA
19:33
Просмотров 20 тыс.
Class Modules in VBA: Made Super Simple
17:43
Просмотров 33 тыс.
Automation: Send bulk emails using VBA and Outlook
13:35
Using the Namespace Object in Outlook VBA
20:09
Просмотров 4,1 тыс.
The Easiest Way to Scrape Web Data with VBA
7:18
Просмотров 110 тыс.
小路飞嫁祸姐姐搞破坏 #路飞#海贼王
00:45