VBA/Excel/Access/Word/Outlook/Email Send
Версия от 16:33, 26 мая 2010; (обсуждение)
Send out email
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 = "name@domain.ru"
.Subject = "Automated Mail Response"
.Body = "This is an automated message from Excel. " & _
Format(Range("A1").Value, "$ #,###.#0") & "."
.Display
End With
Set objMail = Nothing
Set objOL = Nothing
End Sub