Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Sending e-mail with Excel

I have a program which sends e-mail to a group of people. Program works fine
but I would like to get rid of the confirmation which Outlook asks every time
e-mail is sent (A program is trying to automatically send e-mail on your
behalf...).

Here is the code itself.

Sub Create_mail(Mail_address As String)
Dim AppMail As Object
Set AppMail = CreateObject("OutLook.Application")
With AppMail.CreateItem(0)
.To = Mail_address
.Subject = "Subject"
.Body = "Bodytext."
.Send
End With
Set AppMail = Nothing
End Sub

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default Sending e-mail with Excel

The message is a security warning which I don't think you can override!
Ron Debruin has some excellent code which may help:
http://www.rondebruin.nl/sendmail.htm
--
JB


"djExcel" wrote:

I have a program which sends e-mail to a group of people. Program works fine
but I would like to get rid of the confirmation which Outlook asks every time
e-mail is sent (A program is trying to automatically send e-mail on your
behalf...).

Here is the code itself.

Sub Create_mail(Mail_address As String)
Dim AppMail As Object
Set AppMail = CreateObject("OutLook.Application")
With AppMail.CreateItem(0)
.To = Mail_address
.Subject = "Subject"
.Body = "Bodytext."
.Send
End With
Set AppMail = Nothing
End Sub

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
sending mail through excel vmadan16 Excel Programming 1 November 27th 06 05:56 AM
Sending Mail from Excel Ron de Bruin Excel Programming 0 May 1st 06 04:19 PM
General mail failure when sending e-mail from Excel Adrienne Excel Discussion (Misc queries) 5 November 4th 05 12:59 PM
Sending mail from Excel Ron Coderre[_10_] Excel Programming 0 June 2nd 05 04:35 PM


All times are GMT +1. The time now is 06:40 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"