Access Vba Send Email With Attachment

I was looking for code that would allow users to (1) convert all the open documents to PDF and (2) attach them to an email. Create A Toolbar Button With A Hyperlink To A Web Site. Example of some Excel VBA code to send email. You may have to register before you can post: click the register link above to proceed. Sending an email with PowerShell can be a great way to deliver data under the correct circumstances. Send multiple reports as attachments in outlook - access vba? Please see the following code: Dim objOutlook As Outlook. Here is the full VBA source code to send the email from Access. Click the Send button to email the message to its address. Open or create a VBA form or. This tutorial introduces how to send email from MS Access using VBA and VBScript. Doc exists in the C:\ folder. I am using Office 365, I am building an app in Access that processes data, then attaches an Excel file to an email. ← Auto Send Email Through Outlook via Python Code - Topbullets. The table would have the person’s email address and the message (he wrote everything up in MS Excel, and I would just have to paste it in the MS Access table). If you want to send the current workbook as an attachment then use the attachment as This workbook Step 16: Finally send the email by using the Send method. Outlook 2010 Adding an. Connect us to your email (Gmail, Outlook, AOL, iCloud, etc) and then Delete, Archive and Move messages by the hundreds or thousands. - strTo is the recipient* - strCC is the carbon copy recipient* - strSubject is the subject line* - True means don't send it right away; I wish to view the e-mail before sending it. Here is a VBA code that does this task, below VBA code reads recipients, subject, mail body and attachment details from Excel sheet and send emails through MS Outlook. It is possible to send multiple emails to multiple recipients, with each email having a different attachment. Excel-VBA : Send Mail with Embedded Image in message body From MS Outlook using Excel. Public Sub SendMail () Dim myMail As Outlook. Workmanlike may be aware hospital and cancer center be denied and I hope that they get heart for quite some. In this tutorial we will learn How to send the entire Excel Workbook as attachment along with the mail from Microsoft Outlook using Excel VBA. You can include file attachments in the draft message and they’ll be sent with every email. VBA String Length: How to Manipulate and Use Strings of Different Lengths April 3, 2014 by Richa Visual Basic for Applications or VBA is an event driven programming language which enhances, the applications of the Microsoft Office suite of products. 0, MS Outlook 14. The reason is that VBA can use a reference with different Microsoft Objects like outlook, word, PowerPoint, paint, etc. Insert Outlook Signature in mail. The FreeVBCode site provides free Visual Basic code, examples, snippets, and articles on a variety of other topics as well. Work with attachments in DAO. You can attach documents and documents/items/document libraries/sites links to email messages. By doing so, your original workbook will remain unchanged. An Excel spreadsheet is a tool that enables you to organize numerical values and data for the purposes of making calculations, displaying records or performing statistical analyses. Convert Excel data to Outlook Contacts. Send secure email messages and file attachments from Microsoft Outlook with PDF Postman. Body Column B Row 2 =. Being a lazy programmer, I often create a blank document just to send an email this easy way. Emails are sent as base64url encoded strings within the raw property of a message resource. How to send email with HTML body in Excel Macro. Vba Convert Byte Array To String. Unfortunately, that’s not always the case. Sending Access-Objects. The Macro allows you to send the most recently saved version of the excel file you are working in as an attachment. Excel is not only used for storing, cleaning, and analyzing data, but also for automating data-related processes. OR – By using Mail Merge in Microsoft Word, and incorporating a Directory and a macro in the process, you can send an email to a group of people and include an attachment specific to each recipient. Application Dim objOutlookMsg As Outlook. Post subject: Re: Sending multiple reports in one email as multple attachm is there anyway to do this in BO XI 3. 5 as email client. Can you upload sample of your workbook to see what's wrong with it?. Delete any existing code in the Code window. This article will show you how to read emails into Access and save any attachments. The example code is using CDOSYS (CDO for Windows 2000). Learn how to send emails as Outlook messages using these Microsoft Access VBA script examples. SendObject method. Send Email from Access to Gmail: We have come up with another more flexible method for sending email using Google Gmail rather than MS Outlook or Exchange Server. This method can attach a file to the email message from local disk or a remote URL. I have created a script that can create an email using mailto:, but I cannot figure out how to add an attachment. As mentioned earlier, Access 2007 includes a new data type - Attachment - that you can use with ACCDB files in Access. Does anyone know why It;s access 2000 on winxp pro Thanks in advance Russ. Application Set myMail = myOutlApp. This is for an emergency ale [SOLVED] Sending email via Access - Spiceworks. com offers free software downloads for Windows, Mac, iOS and Android computers and mobile devices. I have a form with a button that opens the report and emails it as an attachment using Microsoft Outlook. VB6 - Send Email with Attachment¶ The following vb6 example codes demonstrate how to send email with file attachment using SMTP server. I have an Access db being hosted in a Remote App. I tried to find what I could online using Google or looking at past posts but I'm stuck at only being able to send one email. Email reports from Access as PDF attachments in Outlook I LOVE integrating Access with Outlook, it’s really easy to create a system that allows our clients to export reports as PDF attachments in an email. This Excel VBA Macro will attach the current workbook as an attachment to an email and send it. 65-- Easy E-mail Sending in VB, with Attachments on FreeVBCode. I'm using the code below to send emails from access. The FreeVBCode site provides free Visual Basic code, examples, snippets, and articles on a variety of other topics as well. Test if Outlook is open and open Outlook with VBA. And, of course, you can use VBA to automate these types of tasks. To send email using SendObject Method is simple, because it does not require SMTP sever address and port number. Here is how you can construct a formula to create various components of the email. Email reports from Access as PDF attachments in Outlook I LOVE integrating Access with Outlook, it's really easy to create a system that allows our clients to export reports as PDF attachments in an email. VB6 - Send Email with Attachment¶ The following vb6 example codes demonstrate how to send email with file attachment using SMTP server. First Save the ActiveWorkbook at a temporary location with a given name. The m_Send variable holds the directory of the files you want to send, m_Done holds the directory where you want to move the sent files. Application Dim objOutlookMsg As Outlook. Outlook , Send message with VBA If this is your first visit, be sure to check out the FAQ by clicking the link above. The problem I face is that the number of. The acSendNoObject argument allows you to just send email message without sending an Access object such as a Report or Query object. Now In Access 2010 you can directly send the database table to the recipient through a simple procedure, rather than following the old-school method of attaching file with email. Work with attachments in DAO. One of those methods was. How to send email with HTML body in Excel Macro. Sending Email Using Microsoft Access VBA. Multiple attachments with docmd. There are many ways, but let's focus on how to do it with commonly installed programs first. Sending Access-Objects. If you want to include a recipient-specific attachment, you have to send a separate email to each person. This sample demonstrates sending email with attachment and embedded image in the message body using SMTP server from a VB program. pdf file it would be sent. I do not know how to get this thing to work beyond this point. The FreeVBCode site provides free Visual Basic code, examples, snippets, and articles on a variety of other topics as well. Send email from Excel. The following macro attaches one file to an email message and sends it, then sends the next file in the folder, repeating until all files are sent. Send SMS Text Message With VBA Sep 20, 2007. I'm pretty decent with VBA in Access, but I don't have any experience with Outlook scripting, and my googling hasn't really uncovered what I'm looking for. OberonPlace. Re: StarBasic code to send LotusNotes email with attachment by rudolfo » Fri Oct 11, 2013 1:42 am vinod. Name the caption button as Email. The primary example works from a selection of email addresses in a column. The VBA developer IDE will be opened. Sending Access-Objects. The hand written forms are scanned into. Now I am sure you all will be excited to know how we can send an email with the help of VBA. Send email with report as an attachment. This kind of programmatic discovery is a valuable tool because it makes our code much more robust and adaptable. SendMail "[email protected] Attachment Set objOutlook = CreateObject("Outlook. Depending on what email software is being used, you might be able to use Outlook automation or,. A subroutine you can use to send an e-mail message with an attachment through MS Outlook is here. Please note that a reference to Outlook is required. SMPT Server PORT, SSL, HOST and IsBodyHtml values in the comboboxes|textboxes cannot be read during the sending process. Here is how you can construct a formula to create various components of the email. I have the following VBA codes (acquired from the Internet) that would enable user to use Access 2003 application to send emails out via Outlook 2003. To send email using SendObject Method is simple, because it does not require SMTP sever address and port number. Remember the students and classes example?. Sorry - you're out of luck: IncrediMail has no way to access the actual email source you receive. You can also set in the vba code that the emails are automatically sent immediately without a view. Outlook , Send message with VBA If this is your first visit, be sure to check out the FAQ by clicking the link above. By doing so, your original workbook will remain unchanged. Email reports from Access as PDF attachments in Outlook I LOVE integrating Access with Outlook, it’s really easy to create a system that allows our clients to export reports as PDF attachments in an email. I'll cover the following topics in the code samples below: Access 2003Error, Macro, Proc, Date, and Bulk. As mentioned earlier, Access 2007 includes a new data type - Attachment - that you can use with ACCDB files in Access. Access library objects referenced: visual basic for applications, MS Access 14. Convert Excel data to Outlook Contacts. Mail users not receiving email in an Outlook derivative will have a problem. I have a query which lists the number of records that have a tick box (invite by email) that is displayed in a form. To do this, you need to create a new workbook with that single sheet, and then send it using the Send to Email Recipient. I'm wondering how I can code via Excel VBA to create a new list item and attach the Excel worksheet they are using that contains the schedules into a SharePoint 2010 list. To run the EMailDatabaseObject action in a Visual Basic for Applications (VBA) module, use the SendObject method of the DoCmd object. This tutorial introduces how to send email from MS Access using VBA and VBScript. The field that contains the attachment contains a recordset that is a child to the table's recordset. Post subject: Re: Sending multiple reports in one email as multple attachm is there anyway to do this in BO XI 3. Hello everyone, I am using this code in Access 2010 to send email attachment through Outlook 2010. My company uses hand input forms to enter sales information into a sales order application. The Access 97 online help mentions acFormatActiveXServer, acFormatHTML, acFormatIIS, acFormatRTF, acFormatTXT and acFormatXLS as the available options for the OutputFormat parameter. Now your quick access toolbar will look like this with an email icon. Send Email Using Send Keys. html file is created. Microsoft Word can open this easily. sendobject to email the report in rich text format (RTF). Send Email from MS Access using VBA and VBScript - Tutorial¶. As you probably know, Excel has commands to send worksheets or workbooks via e-mail. Send emails with an attachment from Excel list. Click on the down arrow on the Insert button. If that PDF already exists, you are asked if you want to overwrite it. You will learn how to: Integrate SMSLibX into the Access develop environment and VBA code; Use SMSLibX objects and methods in your VBA code, to send and receive SMS. Place the button on the form like Customer form that has email field. com Do Indian need Shivaji or Patel statues when we are struggling for basic amenities - Group Discussion → 17 thoughts on " Auto Download Outlook Email Attachment - Code in VBA by Topbullets. The goal of this Outlook security warning is to notify you about this action and prevent unauthorized Outlook access. Dear All, I need to send the multiple emails via Outlook through VBA. Here is a script to send email with attachment using your gmail credentials to ensure that your mail doesn't go to spam, and it guarantees the email is delivered to recipient. The automation of E-Mails from a Microsoft Access Database Form is a prime example of this. About the author: Serdar Yegulalp is editor of Windows Insight , a newsletter devoted to hints, tips, tricks, news and goodies for all flavors of Windows users. Can somebody show me the vba code to send an active worksheet as an attachment. Access will not use its own internal format when attaching the object to the email, but they will be exported to more widely used file formats. Ideally, this is what I would like to have happen: frmEmail is the form to set to whom and what. Column A Row 2 = Name of Person, Which must be Displayed on. Emails each with different attachments from a list This file is available with the code. Click the email icon from the quick access toolbar and it will open your default email program. The goal of this Outlook security warning is to notify you about this action and prevent unauthorized Outlook access. I know there is a ton of info in this forum on sending attac Send Access Query as email Attachment - Microsoft: Access Modules (VBA Coding) - Tek-Tips ENGINEERING. Send email without outlook security warning. There are mainly two methods of sending email in Excel VBA. dll Version 3. o all day on Friday I worked on researching different ways to have access send an email to multiple people and multiple attachments. I tried to find what I could online using Google or looking at past posts but I'm stuck at only being able to send one email. Open an existing Access database (or create a new one). This method can attach a file to the email message from local disk or a remote URL. I have the below VBA code attached to a command button to send an email from excel with an attachment. Insert Outlook Signature in mail. Now you can send emails from your Access. Excel, Access, PowerPoint and Word Help > Forum > Help Section > Excel Help > Excel VBA to Attach File And Automatically Send Email If this is your first visit, be sure to check out the FAQ by clicking the link above. It will add some text to the subject line and body of the email also. So we can send the email with the help of VBA. Sending workbook as attachment with a variable name/file path through Gmail with VBA unsolved My company recently migrated from Outlook to Gmail and I'm having to mop up a load of VBA issues. We'll discuss both methods below: Option #1 - Send email from report preview window. As with a lot of things access, there are many, many, MANY different ways to go about this. 0 object library, OLE Automation, MS Office 14. MS Access VBA Programming MS Excel VBA MS Word VBA 10 responses on “ How to Send Multiple Attachments within a Single E-mail Using VBA ” Karen Silva June 11, 2014 at 8:34 pm. Generate personalized emails for. I would display the report and the user would use some built-in send function under the File menu to send it off. However, for power user, the filter is not sufficient. I have a database in Access that is essentially a list of projects and associated tasks. In this article you will learn how to send an Outlook Email with with mail body snapshot like Excel tables, Charts or images by using VBA. Use the mail account you want in your mail macro. This means I need to rename the file before attaching it to the message. Send Email via Lotus Notes from MS Access. VBA for Working with the Access Attachment Datatype A continuous form to manage attached documents. The procedure below sends the active workbook (as an attachment) to [email protected] anydomain. Hi All,I am Developing a Project in VBA Excel. Send a test message with "attach" somewhere in the body and no attachment to make sure the script works. 0 Object library Option Compare Database Private Declare Sub AppSleep Lib "kernel32" Alias "Sleep" (ByVal dwMilliseconds As Long) Function test_send() 'send 10 test emails with attachment Dim strfile As. Send email with attachment (s) from script or command line. Application") Set objOutlookMsg = show more Please. com", "Sample Workbook" End Sub Explanation:In the above example it will send the activeworkbook as an attachment to [email protected] Importing Outlook emails into Access I love Microsoft Office and how we can integrate all of the apps into a cohesive solution. Mail merge email with attachment in Outlook. Depending on what email software is being used, you might be able to use Outlook automation or,. Mail merge doesn't support attachments - if you add one, it's sent as an picture of the attachment's icon in the message body. pdf file it would be sent. This tutorial works in conjunction with Outlook, but all the macros are actually entered in Excel. Here I demonstrate how you can use Google Mail to send out an e-mail from an Internet connected PC, and…. (1) The Visual Basic application opens. jpg attachment, I want it to save it to a folder on a local system. Programmatically open any file (from attachment list) Send emails using HTML body style with Outlook automation. If you remember, the properties we modified were all strings. Automation can be done in Excel by writing or recording macros in VBA. Open an existing Access database (or create a new one). Sub Email_ActiveSheet_As_PDF() 'Do not forget to change the Email ID before running this code. Multiple attachments with docmd. com Forums > Corel User Forums > CorelDRAW > General: Corel 8. The primary example works from a selection of email addresses in a column. China’s clampdown on cryptocurrencies continues as financial authorities reportedly plan to block domestic access to cryptocurrency trading platforms that enable centralized trading, within China and beyond. Here I demonstrate how you can use Google Mail to send out an e-mail from an Internet connected PC, and…. Mail users not receiving email in an Outlook derivative will have a problem. It will create a new mail message and attach the file specified. The problem is if it requires a fixed file name, my file name changes as I am using the date at the end of each file. Use this code to create the VBA file with all the required fields and buttons for: I want excel to send emails to a lot of people, with attachments at once using Macro,VBA! Requires access to Developer tab and VBA Breakdown! Copy and paste the following code into your VBA window: Sub onetimesetup() Range("A1"). I'm pretty decent with VBA in Access, but I don't have any experience with Outlook scripting, and my googling hasn't really uncovered what I'm looking for. Introduction. Insert Outlook Signature in mail. The field [@Name] will be replaced at runtime by the email address. VBA code to send current excel sheet as email attachment through yahoo mail attachment through yahoo mail using a submit button with vba code. To send email using SendObject Method is simple, because it does not require SMTP sever address and port number. A simple way to implement it is to use the file utility with its --mime-type option. Auto delete emails. The next section sends the email and writes to the table. We need to send the notes as attached. I have the below VBA code attached to a command button to send an email from excel with an attachment. The sent emails are opened in this example and displayed as a text format. Some of the many features of SEE4CB include: - Send email with inline HTML, GIF, TIF, JPG, BMP and Rich Text attachments. ' - You don't want the images to show up explicitly as "Attachments" in email clients like Microsoft Outlook ' - You don't want to use the images to "track" who has read your emails (that requirement would be incompatible with the rest) ' - You are using VBScript (ASP, WSH) or Office Visual Basic for Applications (VBA), or Visual Basic 6 (VB6) '. Placing a PowerPoint Slide in an Outlook Message : Email Attachment « Outlook « VBA / Excel / Access / Word. Additional examples show using a HYPERLINK Worksheet Function, and including an email link in HTML all examples including more than just the email address. But because. As only a saved document can be emailed, the user is also given the option to save it. Why? Because all of the current methods of sending email. com Forums > Corel User Forums > CorelDRAW > Macros/Add-ons: X7 VBA and Controls Collection. The workbook used in this exercise can be found here. Can somebody show me the vba code to send an active worksheet as an attachment. You’ll now going to inset a Visual Basic module. Ideally, this is what I would like to have happen: frmEmail is the form to set to whom and what. Send Email in Excel VBA using CDO and OlMailItem. This blog will show you how to email a report from Access using Outlook in three different ways. You can instruct harmon. My code below sends an email containing an attachment out of MS Access 2010. Mail users not receiving email in an Outlook derivative will have a problem. Working with Attachment Fields. When you run SendObject, whoever run the code will trigger to send email from its Outlook, instead of sending from a specific server email. Generate personalized emails for. As only a saved document can be emailed, the user is also given the option to save it. I have a form with a button that opens the report and emails it as an attachment using Microsoft Outlook. Press the down arrow on the Quick Access Toolbar (QAT) and select More Commands…. You can also set in the vba code that the emails are automatically sent immediately without a view. VBA String Length: How to Manipulate and Use Strings of Different Lengths April 3, 2014 by Richa Visual Basic for Applications or VBA is an event driven programming language which enhances, the applications of the Microsoft Office suite of products. The table would have the person’s email address and the message (he wrote everything up in MS Excel, and I would just have to paste it in the MS Access table). I do not know how to get this thing to work beyond this point. You'll be able to use the skills you learn in this tutorial to send emails from Excel to multiple users with a custom. is there a way around this?. ← Auto Send Email Through Outlook via Python Code – Topbullets. Attach this Temporary file in the email as an attachment and send email. Unfortunately, that’s not always the case. You can use this VB code to automatically fill in the subject and body text of the email. Ideally, this is what I would like to have happen: frmEmail is the form to set to whom and what. The hand written forms are scanned into. This VBA example uses the docmd. This page describes how to send email using VBA. The problem I face is that the number of. Place the button on the form like Customer form that has email field. Use SMTP to send email (VBSMTPSendEmail) in VB. Select Normal. Ideally, this is what I would like to have happen: frmEmail is the form to set to whom and what. In my example I will send an existing report as an attachment to an email. It will create a new mail message and attach the file specified. Work with attachments in DAO. com", "Sample Workbook" End Sub Explanation:In the above example it will send the activeworkbook as an attachment to [email protected] If all you want to do is send the workbook, with just a subject but no content, you can use ThisWorkbook. 65-- Easy E-mail Sending in VB, with Attachments on FreeVBCode. To send an email with file attachment, we need to use AddAttachment method. To send email using SendObject Method is simple, because it does not require SMTP sever address and port number. If you want to send the current workbook as an attachment then use the attachment as This workbook Step 16: Finally send the email by using the Send method. Please find the below example, it will show you how to send an email using SendMail workbook method using VBA. Note that you cannot touch the keyboard or mouse while processing the emails. The specifics of the email are all contained within the macro. The Outlook security warning window pops up whenever a non-trusted program (Outlook add-in, Macro script, etc) is trying to access Outlook and send email on your behalf. I will show you the step below. Send Microsoft Access Report as Outlook or Other Email Attachment Here is a simple method for mailing an Access report to someone as an attachment. Delaying Email Sending (Outlook + VBA) every time you send an email out of hours you will be asked if you want to send the email now or at a later time. The high-level workflow to send an email is to:. However these solutions require a lot more familiarity with VBA code. Sorry - you're out of luck: IncrediMail has no way to access the actual email source you receive. I'm using the code below to send emails from access. Single Recipient Email Id. Delete any existing code in the Code window. The problem is if it requires a fixed file name, my file name changes as I am using the date at the end of each file. Here I demonstrate how you can use Google Mail to send out an e-mail from an Internet connected PC, and…. Mail users not receiving email in an Outlook derivative will have a problem. I do not know how to get this thing to work beyond this point. Hello all, i have spent some time making a new user form for the hr staff. Because you'll be calling on Outlook to do the job, the first step in the VBA editor is to choose ToolsOReferences from the menu bar and set a reference to the Microsoft Outlook object library. The automation of E-Mails from a Microsoft Access Database Form is a prime example of this. (I use this code behind each form because the same forms are used to filter specific reports to specific Users. So we can send the email with the help of VBA. The problem is if it requires a fixed file name, my file name changes as I am using the date at the end of each file. You can send email from MS Access via MS Outlook and attach the signature. In this project, I have to get some data from database and need to mail the file. The specifics of the email are all contained within the macro. Can somebody show me the vba code to send an active worksheet as an attachment. The users would typically be using Outlook Express as their email client. Can discuss further. VBA create mail with attachment and voting buttons. Attachment - is the file name that will be attached to the message. You can also include inline images, animated GIFs, and make your message stand out with rich-text formatting. Sub EmailWorkbook() 'PURPOSE: Create email message with ActiveWorkbook attached 'SOURCE: www. o all day on Friday I worked on researching different ways to have access send an email to multiple people and multiple attachments. In order to see and use this new feature, you need to update Access: you must be using Access 2013 that has a minimum build number of 15. pdf file it would be sent. About the author: Serdar Yegulalp is editor of Windows Insight , a newsletter devoted to hints, tips, tricks, news and goodies for all flavors of Windows users. China’s clampdown on cryptocurrencies continues as financial authorities reportedly plan to block domestic access to cryptocurrency trading platforms that enable centralized trading, within China and beyond. I know there is a ton of info in this forum on sending attac Send Access Query as email Attachment - Microsoft: Access Modules (VBA Coding) - Tek-Tips ENGINEERING. As with a lot of things access, there are many, many, MANY different ways to go about this. 232 Help General. Another way to send an email is to use the ShellExecute command to execute any program within vba. Attachment Tab. Emails each with different attachments from a list This file is available with the code. How can I automatically generate an email from this query? Ideally this would just magically send an email whenever the query is populated with a new project. Excel 2016 VBA to send email - old VBA (Excel 2010 no longer works) Application - Excel 2016 & Outlook 2016 My OLD MACRO code worked fine in Excel 2010, now we have been upgraded to Office 365 (2016), and my coding debugs at the ". Now, this code will send the email from your VBA outlook mail. The field [@Name] will be replaced at runtime by the email address. You would assume that since Microsoft Office documents, spreadsheets, and reports etc. In Outlook 2000-2003: Select Insert > File from the menu. In a previous article I already wrote about how you can send a file via email, now let's look at how you can find emails with different attachment. You just need to have Excel and Outlook and use mergelook. All the questions are answered with simple examples. Doc exists in the C:\ folder. The first method is to use CDO Object, another is to use SendObject Method, I will explain each method in the below sections. Sub Email_ActiveSheet_As_PDF() 'Do not forget to change the Email ID before running this code. The Outlook security warning window pops up whenever a non-trusted program (Outlook add-in, Macro script, etc) is trying to access Outlook and send email on your behalf. using DoCmd. SendObject( ObjectType, ObjectName, OutputFormat, To, Cc, Bcc, Subject, MessageText, EditMessage, TemplateFile) As you can see, it even enables you to send a database object (table, query, form, report,. Save E-mail attachments to folder. I have been searching for something that allows for easier sending of template responses with attachments, similar to what this example seems to be doing. Below Excel Macro Example will send the email from outlook with attachment. Application Set myMail = myOutlApp. Insert Outlook Signature in mail. In order to attach multiple documents to an email message using VBA, you will need to implement some form of automation - the SendObject method only supports a single filename being passed as an argument. Convert Excel data to Outlook Contacts. ” b) Paste the code you copied into the Visual Basic Editor: Click the Create button. If you need any help. Send Property. I absolutely love using the Email As Attachment functionality provided by Excel. I have the below VBA code attached to a command button to send an email from excel with an attachment. Sending EMail With VBA. I have no problems with using VBA to create emails or to add attachments. Set up your Table and your Query, see examples below, changing the field names to match your own. Using the AES-128 or AES-256 bit encryption built into PDF file viewers, your recipient only needs a password to receive your emssage and file attachments.