Sub EmailRange() '******************************************************************************* 'This code requires you to Set the References. GoTo Tools > Reference >Search 'For Microsoft Outlook (A number) .Object Library and tick the box 'The following sample will look to email a filtered list of data with todays date 'Created by Trevor G 'May 2011 '******************************************************************************* Dim OutlookApp As Outlook.Application Dim MailSelection AsObject Dim cell As Range Dim Subject AsString Dim EmailAddress AsString ThisWorkbook.Sheets("Name").Select Range("A3").Select Selection.AutoFilter ActiveSheet.Range("$A$3:$j$35").AutoFilter Field:=4, Criteria1:= _ xlFilterToday, Operator:=xlFilterDynamic 'Adjust the range of cells Range("A3").Select ActiveCell.CurrentRegion.Copy Set OutlookApp = CreateObject("Outlook.Application") Set MailSelection = OutlookApp.CreateItem(0) With MailSelection .To = "trevor_g" 'Change to email address .Subject = "Invoice" .Display 'Change to send once checked. SendKeys "^({v})", True'This is the same as using Paste EndWith ' End If 'Next
End Sub
We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel
Which adblocker are you using?
Disable AdBlock
Follow these easy steps to disable AdBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the icon in the browser’s toolbar. 2)Click on the "Pause on this site" option.
Go back
Disable AdBlock Plus
Follow these easy steps to disable AdBlock Plus
1)Click on the icon in the browser’s toolbar. 2)Click on the toggle to disable it for "mrexcel.com".
Go back
Disable uBlock Origin
Follow these easy steps to disable uBlock Origin
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.
Go back
Disable uBlock
Follow these easy steps to disable uBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.