Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I changed my code to the following, does it look correct? Thanks for
your help. Sub modEmail() If Worksheets("Sheet1").Range("B33") = "Yes" Then Dim OutApp As Object Dim OutMail As Object Dim strto As String, strcc As String, strbcc As String Dim strsub As String, strbody As String Set OutApp = CreateObject("Outlook.Application") OutApp.Session.Logon Set OutMail = OutApp.CreateItem(0) strto = "My E-mail Address" strcc = "" strbcc = "" strsub = "CSU Inventory Gain" strbody = "This is an automated message." With OutMail .To = strto .CC = strcc .BCC = strbcc .Subject = strsub .Body = strbody .Send End With Set OutMail = Nothing Set OutApp = Nothing End If Close Workbook Else Exit Sub Close Workbook End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Convert to HTML and e-mail selection as the body of the e-mail. | Excel Programming | |||
Error: cannot load the mail service. Check your mail installation. | Excel Discussion (Misc queries) | |||
General mail failure when sending e-mail from Excel | Excel Discussion (Misc queries) | |||
Creating TWO-WAY E-Mail Attachments with 'BeforeSave Events' in Code for 2nd E-Mail | Excel Programming |