Quick Steps

SendMail documentation

4 Simple Steps to start working

  1. Open an existing Macro-enabled Workbook or create a New one
  2. Copy the Code at the top of the "mdlWhitePaper" Code Module marked "## BEGIN ##" to "## END ##". Paste into the top of your Code Module
  3. Copy & Paste in the relevant SendMail Subroutine and any Helper Subroutines / Functions required
  4. Configure the Call to SendMail or SendMail2 by changing the Parameters and compile the Code

Acknowledgement

SendMail was written by Mark Kubiszyn

  • the latest version is version 1.0.0.1
  • as per terms of the Software License, you should leave the following code attribution in situ

' © Copyright/Author:
' Mark Kubiszyn 2012-2017. All Rights Reserved
' Website/Follow:
' http://www.kubiszyn.co.uk/
' https://www.facebook.com/Kubiszyn.co.uk/
						

Purchase

You can Purchase SendMail for £2.99 via FastSpring by clicking here

Subroutine Listing

Here is the full listing of all of the available 32 SendMail Subroutines when you purchase the Software:


1. Display & Send an Email with a Text or HTML Body
2. Display & Send an Email with the Default Signature and a HTML Body + Signature
3. Send an Email with the Default Signature and a HTML Body + Signature (force Send & Receive)
4. Display an Email to the User by Building a HTML Body using a String with Social Icons using Web links
5. Display an Email by Building a HTML Body using a String with an Excel Icon using Table Cells
6. Use a Dialog to Prompt for Multiple Attachments and Email the Attachments using a Default Signature
7. Send an Email with High Importance, Confidential Sensitivity & Request a Read Receipt using a Default Signature
8. Display & Send an Email using an Alternative Method of Passing Parameters
9. Mail the Active Workbook using a Default Signature
10. Mail the Active Workbook as a PDF File using a Default Signature
11. Mail Sheet1 & Sheet2 in this Workbook as a single .XLSX Workbook Report Attachment
12. Mail Sheet1 & Sheet2 in this Workbook as Separate Workbook Report Attachments (.XLSX & .XLSM)
13. Mail Sheet1 & Sheet3 in this Workbook as a Single PDF File using a Default Signature
14. Mail Sheet2 & Sheet3 in this Workbook as a Single Workbook as Special Values
15. Send an Email with an Excel Range as the Body together with a Default Signature
16. Send an Email with a Default Signature using the Mailing Lists in this Workbook

- SendMail2 Examples
17. Send an Email with a HTML Message & Using the Default Signature
18. Send an Email with a HTML Template containing Local Images
19. Send an Email with a HTML Message as the Body & a Default Signature
20. Send an Email with a HTML Message as the Body
21. Send an Email with a HTML Message as the Body using Passive Mode
22. Display an Email with a HTML Message as the Body and Wait for the user to Send
23. Display an Email with a HTML Message & a Default Signature as the Body and Wait for the User to Send
24. Display an Email with a HTML Template containing URL Images and Wait for the User to Send
25. Display an Email with the Active Workbook as the Attachment using a Default Signature
26. Mail the ActiveWorkbook as a PDF File using a Default Signature with Low Importance & Private Sensitivity
27. Get the Users Default Signature Name
28. Get all of the Users Signature Names
29. Get the Users Default Reply Message Signature Name from Microsoft Word
30. Using a Settings List to Send Mutiple Emails using a Default Signature
31. Using a Settings List to Send Mutiple Emails using a HTML Body Signature & Wait For User
32. Read in HTML from a Template into a VBA Code Module
						

Before you Start

Press ALT+F11 and configure your Email Addresses at the top of the Code Module and for the Mailing Lists in 'Sheet1' Download the Files to accompany this article on the link below and extract them to a new Folder C:\SendMailFiles Other parts may need some configuration (they are highlighted Yellow) - you should do this prior to Clicking the Button to run the Example

HTML Templates

Outlook Security Guard Issues

Normally this Software will send Email silently without trigering the Outlook Guard, however, sending Email will trigger Outlook to display the Warning Dialog Box asking you to Allow the Email if your Anti-virus Software has not been recently updated. Outlook believes that extra Security is required and displays the prompt regardless of how you write the VBA Code (including my SendMail Code). I know, because this has happened to me at work. All of a sudden I received the Outlook Warning

I checked my Anti-virus Software and sure enough it had not updated. I logged a ticket and our IT support sent the Anti-virus Software (System Center Endpoint protection) down again to my PC, refreshed the Group Policy on my machine and I was soon good to go again

Please Note: the type of Anti-virus Software may be different for your PC or work machine. I also had my work machine upgraded to Office 2013 before they re-installed the Anti-virus Software and Outlook 2013 still displayed the Warning Message so you need to check your Anti-virus is up-to-date and working

There are other methods of disabling the Outlook Security Guard. You can change Outlook's Programmatic Access Options - I have added the Disclaimer below (which is displayed on the Webpage that opens) as I do not condone using these methods and neither do the authors of the article

"Please note that the advice on this page reduces Outlook's security level and could leave you open to an exploit that takes over Outlook and sends mail on your behalf. We highly recommend you use up-to-date antivirus software that Outlook can detect and leave these settings alone. But, when all else fails, there is a way to disable the programmatic access warning in Outlook 2007 and up"

How to disable the Outlook Security Guard by changing Outlook's Programmatic Access Options

Screen Shots

Sendmail - Display an Email using the Default Signature:

Display an Email using the Default Signature

Sendmail - Demonstrates Building a HTML Body using Online Social Icons with Web Links:

Demonstrates Building a HTML Body using Online Social Icons with Web Links

Sendmail - Demonstrates Building a HTML Body using Table Cells as an Image (the Excel Icon is actually made from Table Cells as opposed to loading an image):

Demonstrates Building a HTML Body using Table Cells as an Image

Sendmail - Demonstrates using a Dialog to Prompt for Files and then Attaching & Sending an Email using the Default Signature:

Demonstrates using a Dialog to Prompt for Files and then Attaching & Sending an Email using the Default Signature

Sendmail - Demonstrates mailing the Workbook as a PDF File as an Attachment:

Demonstrates mailing the Workbook as a PDF File as an Attachment

Sendmail - Demonstrates mailing a single Worksheet as an .XLSX File as an Attachment with Date/TimeStamp:

Demonstrates mailing a single Worksheet as an .XLSX File as an Attachment with Date/TimeStamp

Support

Support is only given to Purchased Software. You should only contact me on the Support Email address supplied by FastSpring - please provide proof of purchase ie. Email address or Order Reference

Changelog

07.04.2015 - (Version 1.0.0.1) General release. Fix for the comments in Example 17 & notification to user to configure Signature in Example 3

06.04.2015 - (Version 1.0.0.0) Released for beta testing