![]() |
Automated Email
Hey Guys,
i am having a problem at the moment trying to send a spreadsheet as the body of an email automatically. the workbook i am using has a main sheet, this sheet contains the names of all the stores i need to contact, each store has a sheet and on this sheet is the information i want to send formatted as a pivot table. i need a macro sub that will allow me to input this sheet information (pivot table) as the body of the email and then send it to an email address i will specify in the code. this is what i have so far. Sub SendMail() Dim OutlookApp As Object Dim MItem As Object Set OutlookApp = CreateObject("Outlook.Application") Set MItem = OutlookApp.CreateItem(0) With MItem .To = " .Subject = "Report Details" .Body = ThisWorkbook.Sheets("store1").Copy .Send End With End Sub this is gettin annoying. the Noob. |
Automated Email
Hi Noob
See the examples in the body section on this page http://www.rondebruin.nl/sendmail.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Noob McKnownowt" wrote in message ... Hey Guys, i am having a problem at the moment trying to send a spreadsheet as the body of an email automatically. the workbook i am using has a main sheet, this sheet contains the names of all the stores i need to contact, each store has a sheet and on this sheet is the information i want to send formatted as a pivot table. i need a macro sub that will allow me to input this sheet information (pivot table) as the body of the email and then send it to an email address i will specify in the code. this is what i have so far. Sub SendMail() Dim OutlookApp As Object Dim MItem As Object Set OutlookApp = CreateObject("Outlook.Application") Set MItem = OutlookApp.CreateItem(0) With MItem .To = " .Subject = "Report Details" .Body = ThisWorkbook.Sheets("store1").Copy .Send End With End Sub this is gettin annoying. the Noob. |
Automated Email
Thanks for your help, very much appreciated
The Noob. "Ron de Bruin" wrote: Hi Noob See the examples in the body section on this page http://www.rondebruin.nl/sendmail.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Noob McKnownowt" wrote in message ... Hey Guys, i am having a problem at the moment trying to send a spreadsheet as the body of an email automatically. the workbook i am using has a main sheet, this sheet contains the names of all the stores i need to contact, each store has a sheet and on this sheet is the information i want to send formatted as a pivot table. i need a macro sub that will allow me to input this sheet information (pivot table) as the body of the email and then send it to an email address i will specify in the code. this is what i have so far. Sub SendMail() Dim OutlookApp As Object Dim MItem As Object Set OutlookApp = CreateObject("Outlook.Application") Set MItem = OutlookApp.CreateItem(0) With MItem .To = " .Subject = "Report Details" .Body = ThisWorkbook.Sheets("store1").Copy .Send End With End Sub this is gettin annoying. the Noob. |
All times are GMT +1. The time now is 02:05 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com