Search

Showing posts with label Outlook VBA. Show all posts
Showing posts with label Outlook VBA. Show all posts

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


Hey guys!  in this video,  I'll show you how to automatically trigger a VBA program whenever a new email is received in outlook. This same method can be replicated for other outlook items like a meeting, appointment etc.

The scope is huge and it really depends on how you want to utilize it. In this example, we'll build a simple program to check if the new email received meets certain criteria, if so we'll download the attachment, and load the data from attachment to master Excel Workbook from outlook itself.

Do not forget to subscribe and hit that bell icon for upcoming videos.

Subscribe Now!
New videos every Weekend!


Like what I do? Donate
Did I help you? Did one of my tutorials save you sometime? 
You can say thank you by buying me a cup of coffee, I go through a lot of it.
Help keep Greater Good resources free for everyone. Please donate today. 




This page is not monitored so for questions please comment on the youtube video page. For suggestions email vbaa2z.team@gmail.com


How to automate email using VBA. Create dynamic, responsive and mobile-friendly content

Hey guys! in this video, I'll show you step by step on how to automate sending an email with and without VBA Program via Outlook. We'll also explore ways to create dynamic, responsive and mobile-friendly content/template and I'll also share tips and tricks from my experience.

A while ago I have done a detailed tutorial on how to send email using VBA without Outlook but using any providers like Gmail, Yahoo, or Microsoft. I'll leave a link in the video description please feel free to check it out in case you missed it.


Subscribe Now!
New videos every Weekend!


Like what I do? Donate
Did I help you? Did one of my tutorials save you sometime? 
You can say thank you by buying me a cup of coffee, I go through a lot of it.
Help keep Greater Good resources free for everyone. Please donate today. 




This page is not monitored so for questions please comment on the youtube video page. For suggestions email vbaa2z.team@gmail.com

Download project or source code from below link(s)

VBA to download email attachments from Outlook with multi Criteria. Real-life Automation Project

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 (Including Shared Mailbox)
* Search email based on various parameters 
* Download the attachment to a folder
* Design a simple UI to send get parameters
* More tips and tricks . . . 


Like what I do? Donate
Did I help you? Did one of my tutorials save you sometime? 
You can say thank you by buying me a cup of coffee, I go through a lot of it.
Help keep Greater Good resources free for everyone. Please donate today. 




This page is not monitored so for questions please comment on the youtube video page. For suggestions email vbaa2z.team@gmail.com

Download project or source code from below link(s)

Q-Mail-skeleton.xlsm: - > http://bit.ly/2TSnAC7

Email Automation using VBA without outlook. Send emails via Gmail, Yahoo or Microsoft Accounts


This blog is part of below video tutorial Email Automation using VBA without outlook. Send emails via Gmail, Yahoo or Microsoft Accounts
https://www.youtube.com/watch?v=nj8mU3ecwsM

Please support by subscribing to our channel and sharing them with your friends.

If you have any questions/feedback/tutorial request, please you can email me directly vbaa2z.team@gmail.com or comment on YouTube Video (blog comments are not actively monitored).




If you're not familiar with HTML, use this simple site where you type in the email body and insert a table within the email. http://htmleditor.in/index.html


Now use VBA to loop through you records/table/cells using VBA and construct variables for example: 
<tr>
  <td>
    1</td>
  <td>
    Jessica Miles</td>
  <td>
    $4,456,543.00</td>
</tr>

VBA Code sample:- use this sort of function to convert your records to HTML tag and use them in your send email code.

'<tr>
'  <td>
'    1</td>
'  <td>
'    Jessica Miles</td>
'  <td>
'    $4,456,543.00</td>
'</tr>

Function curR_html(field1$, field2$, field3$) As String

Dim x$

x = "<tr>"
x = x & vbNewLine & "  <td>"
x = x & vbNewLine & "    " & field1$ & "</td>"
x = x & vbNewLine & "  <td>"
x = x & vbNewLine & "    " & field2$ & "</td>"
x = x & vbNewLine & "  <td>"
x = x & vbNewLine & "    " & field3$ & "</td>"
x = x & vbNewLine & "</tr>"

curR_html = x

End Function

Sub test_curR_html()
  Debug.Print curR_html("3", "Andrew Dow", "$1,345,544.00")
End Sub


Full email body - HTML Code sample: 
<html>
 <head>
  <title></title>
 </head>
 <body>
  <p>
   Hi Pamai,</p>
  <p>
   this is sample body line1.</p>
  <p>
   this is sample body line2.</p>
  <p>
   &nbsp;</p>
  <table border="1" cellpadding="1" cellspacing="1" style="width: 500px">
   <tbody>
    <tr>
     <td>
      ID</td>
     <td>
      Clients</td>
     <td>
      Amount</td>
    </tr>
    <tr>
     <td>
      1</td>
     <td>
      Jessica Miles</td>
     <td>
      $4,456,543.00</td>
    </tr>
    <tr>
     <td>
      2</td>
     <td>
      Adam Lam</td>
     <td>
      $6,222,221.00</td>
    </tr>
   </tbody>
  </table>
  <p>
   Thanks and regards,</p>
  <p>
   Lung</p>
 </body>
</html>