Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help for Send Mail via Outlook
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help for Send Mail via Outlook
You cannot! but you can use another method see Ron de Bruin site.....
http://www.rondebruin.nl/mail/prevent.htm -- Cheers Nigel "new.microsoft.com" wrote in message ... 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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help for Send Mail via Outlook
On Sat, 30 Jul 2005 10:13:17 +0800, "new.microsoft.com"
wrote: 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 I had the same - frustrating problem, and the discovered the small "ClickYes" bit of software - see http://www.contextmagic.com/express-clickyes/ You still get the delay of 5 seconds whilst Outlook waits for an answer, but then this utility 'presses' the OK key for you. Rgds __ Richard Buttrey Grappenhall, Cheshire, UK __________________________ |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help for Send Mail via Outlook
How can I use the outlook express to send mail rather than use outlook?
"Nigel" wrote in message ... You cannot! but you can use another method see Ron de Bruin site..... http://www.rondebruin.nl/mail/prevent.htm -- Cheers Nigel "new.microsoft.com" wrote in message ... 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 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help for Send Mail via Outlook
Should be the same, after all a web page doesn't know
what email program you have for your default. The other question about sending automatically is ActiveWorkbook.FollowHyperlink (Olmail) Application.Wait (Now + TimeValue("0:00:03")) Application.SendKeys "%s" -- --- HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm Search Page: http://www.mvps.org/dmcritchie/excel/search.htm "new.microsoft.com" wrote in message ... How can I use the outlook express to send mail rather than use outlook? "Nigel" wrote in message ... You cannot! but you can use another method see Ron de Bruin site..... http://www.rondebruin.nl/mail/prevent.htm -- Cheers Nigel "new.microsoft.com" wrote in message ... 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 |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help for Send Mail via Outlook
sorry hadn't looked carefully enough not familiar with Outlook
mail and thought you had created a string as it were a hyperlink |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
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 |