Thread: Automated Email
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Noob McKnownowt Noob McKnownowt is offline
external usenet poster
 
Posts: 37
Default 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.