Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I use a VBA code as following to send email in Excel, but every time the
Outlook require me to confirm Yes/No to send out mail. How can I disable that confirmation step? Thanks Sub SendWithAtt() Dim olApp As Outlook.Application Dim olMail As MailItem Dim CurrFile As String Set olApp = New Outlook.Application Set olMail = olApp.CreateItem(olMailItem) ActiveWorkbook.Save ' CurrFile = ActiveWorkbook.path & "\" & ActiveWorkbook.Name CurrFile = ActiveWorkbook.path & "\" & "OSAllowRates.pdf" With olMail .To = "" '.CC = "" .Subject = "Testing" .Body = "Hello" .Body = ActiveSheet.Range("D4").Text & vbCrLf .Attachments.Add CurrFile .Send '.Display ' '.BodyFormat End With Set olMail = Nothing Set olApp = Nothing End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Bypass: A program is trying to send mail using Item.Send prompt | Excel Discussion (Misc queries) | |||
Macro to send a mail to outlook | Excel Discussion (Misc queries) | |||
loop trough e-mail address list to send task lists with outlook | Excel Discussion (Misc queries) | |||
Send to Outlook 2000 not Outlook Express | Excel Discussion (Misc queries) | |||
Send mail from vba with the outlook distribution list | Excel Programming |