View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Loz[_2_] Loz[_2_] is offline
external usenet poster
 
Posts: 3
Default Automatic email from excel

Hi,

I'm not very good at coding and I have some source code
from somewhere else (sorry I don't know where) that
answers part of your question. Hopefully one of the wizzes
out there can assist with the rest.
Sorry if I've wasted your time.
Cheers,
Loz
************

Sub Send_Msg()

Dim objOL As New Outlook.Application
Dim objMail As MailItem

Set objOL = New Outlook.Application
Set objMail = objOL.CreateItem(olMailItem)

With objMail
.To = "
.Subject = "Automated Mail Response"
.Body = "This is an automated message from Excel. " & _
"The cost of the item that you inquired about
is: " & _
Format(Range("A1").Value, "$ #,###.#0") & "."
.Display
.Send
End With

Set objMail = Nothing
Set objOL = Nothing
'For Each...Next Statement
End Sub