

Set pApp = CreateObject("Outlook.Application") Sub Mail_Merge_Only_Excel_Send_Mail(mAddress As String, mSubject As String, _ĮName As String, eLocation As String, eCity As String) Cells(.Rows.Count, 5).End(xlUp).Rowįor x = 5 To eRow 'Specific Row to Row to Last RowĬall Mail_Merge_Only_Excel_Send_Mail(mAddress, mSubject, _ Set xSheet = ThisWorkbook.Sheets("VBA1") 'WorkSheet NameĮRow =.
#Mailings in excel code#
Next, type the following code inside the Module window.ĭim mAddress As String, mSubject As String, eName As String, _.So, this will bring up the Module window, where we type our VBA code.Secondly, from Insert > select Module.Alternatively, you can press ALT + F11 to display the VBA window.Firstly, from the Developer tab > select Visual Basic.
#Mailings in excel how to#
Before doing all that, let us show you how to bring up the Module window and type a VBA code. Then, we will run this code, which will send the emails automatically to the listed customers using our predefined template. We will insert a VBA code with two Sub procedures using a single Module to mail merge in Excel without Word. Mail Merge to Send Email Automatically in Excelįor the first method, our Worksheet name is “ VBA1”.
:max_bytes(150000):strip_icc()/ExcelData-5bec4181c9e77c0026283623.jpg)
Additionally, for privacy reasons, we have made up 3 email addresses for our dataset and the last one belongs to this article writer, which we will use to verify that we can send an email without any issues.ġ. We will see the latter dataset in the second method of this article. Moreover, we will use two datasets to demonstrate our Macros, from those the first dataset has the following columns: “ Name”, “ Email Address”, “ City”, and “ Street Address”. So read through this article to know about it more in-depth. However, we will do it differently, using only Microsoft Excel to perform mail merge.
