Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Automated Email Messages from Excel w/VBA

Hi - the routine below sends an email message on behalf of
outlook from MS Excel. Every time it tries to send an
email a message in outlook pops up saying that another
application is trying to send an email on outlook's
behalf, would i like to allow this?

Does anyone know if there is a way to avoid having outlook
display this message and just send the email? My routine
is displayed below my signature. Thanks!
-Aaron

Sub SendEmails()

'\\DECLARATIONS\\
Dim mlNewMessage As MailItem
Dim myOlApp
Dim strBody As String

'\\-BUILD EMAIL BODY-\\
strBody = "This is the Email Body"

'\\E-MAIL GENERATION BUILD BEGINS HERE\\
Do Until Range("A1").Offset(a, 0) = "STOP"

Set myOlApp = CreateObject
("Outlook.Application") 'Create New Outlook Item
Set mlNewMessage = myOlApp.CreateItem
(olMailItem) 'Create New Mail Item
mlNewMessage.Body = strDear & strBody &
strConfidentiality 'Defines Email Body
mlNewMessage.Subject = "Message
Subject" 'Defines "Subject"
mlNewMessage.To = Range("A1").Offset(a,
1) 'Defines "To"

mlNewMessage.Send
'Sends Email Message

Set myOlApp =
Nothing 'Clears
mlOlApp Variable
Set mlNewMessage =
Nothing 'Clears mlOlApp
Variable
a = a + 1
Loop

End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default Automated Email Messages from Excel w/VBA

I posted a similar question a few days ago. That message
is a security feature that was included starting with
Outlook 2000 SR-2. And it bothers me too. I had an auto-
emailing program I was using with SR1, but it won't work
on another person's PC.

There is a DLL you can get that should allow you to bypass
the message. It involves some reprogramming, and I
haven't had time to try it myself because this is low
priority for me, but here's the address I was given.

http://www.dimastr.com/redemption/


-----Original Message-----
Hi - the routine below sends an email message on behalf

of
outlook from MS Excel. Every time it tries to send an
email a message in outlook pops up saying that another
application is trying to send an email on outlook's
behalf, would i like to allow this?

Does anyone know if there is a way to avoid having

outlook
display this message and just send the email? My routine
is displayed below my signature. Thanks!
-Aaron

Sub SendEmails()

'\\DECLARATIONS\\
Dim mlNewMessage As MailItem
Dim myOlApp
Dim strBody As String

'\\-BUILD EMAIL BODY-\\
strBody = "This is the Email Body"

'\\E-MAIL GENERATION BUILD BEGINS HERE\\
Do Until Range("A1").Offset(a, 0) = "STOP"

Set myOlApp = CreateObject
("Outlook.Application") 'Create New Outlook Item
Set mlNewMessage = myOlApp.CreateItem
(olMailItem) 'Create New Mail Item
mlNewMessage.Body = strDear & strBody &
strConfidentiality 'Defines Email Body
mlNewMessage.Subject = "Message
Subject" 'Defines "Subject"
mlNewMessage.To = Range("A1").Offset(a,
1) 'Defines "To"

mlNewMessage.Send


'Sends Email Message

Set myOlApp =
Nothing 'Clears
mlOlApp Variable
Set mlNewMessage =
Nothing 'Clears mlOlApp
Variable
a = a + 1
Loop

End Sub
.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Automated Email Messages from Excel w/VBA

This is maybe a other option for the OP
http://www.rondebruin.nl/cdo.htm

Or use OE for all Excel mailings with code


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Mike" wrote in message ...
I posted a similar question a few days ago. That message
is a security feature that was included starting with
Outlook 2000 SR-2. And it bothers me too. I had an auto-
emailing program I was using with SR1, but it won't work
on another person's PC.

There is a DLL you can get that should allow you to bypass
the message. It involves some reprogramming, and I
haven't had time to try it myself because this is low
priority for me, but here's the address I was given.

http://www.dimastr.com/redemption/


-----Original Message-----
Hi - the routine below sends an email message on behalf

of
outlook from MS Excel. Every time it tries to send an
email a message in outlook pops up saying that another
application is trying to send an email on outlook's
behalf, would i like to allow this?

Does anyone know if there is a way to avoid having

outlook
display this message and just send the email? My routine
is displayed below my signature. Thanks!
-Aaron

Sub SendEmails()

'\\DECLARATIONS\\
Dim mlNewMessage As MailItem
Dim myOlApp
Dim strBody As String

'\\-BUILD EMAIL BODY-\\
strBody = "This is the Email Body"

'\\E-MAIL GENERATION BUILD BEGINS HERE\\
Do Until Range("A1").Offset(a, 0) = "STOP"

Set myOlApp = CreateObject
("Outlook.Application") 'Create New Outlook Item
Set mlNewMessage = myOlApp.CreateItem
(olMailItem) 'Create New Mail Item
mlNewMessage.Body = strDear & strBody &
strConfidentiality 'Defines Email Body
mlNewMessage.Subject = "Message
Subject" 'Defines "Subject"
mlNewMessage.To = Range("A1").Offset(a,
1) 'Defines "To"

mlNewMessage.Send


'Sends Email Message

Set myOlApp =
Nothing 'Clears
mlOlApp Variable
Set mlNewMessage =
Nothing 'Clears mlOlApp
Variable
a = a + 1
Loop

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
Export messages to Excel Eric_NY Excel Discussion (Misc queries) 1 May 27th 09 11:59 PM
how do i send an automated email from excel using an if statement Daniel Excel Worksheet Functions 0 August 5th 08 11:07 AM
Excel'03 - non printing help/hint automated messages working Excel Discussion (Misc queries) 5 July 25th 07 02:06 AM
can an automated notification (on xls file changes) email can be anat_ny Excel Discussion (Misc queries) 1 July 10th 07 07:16 PM
Excel messages for Blackberry RPTGuy Excel Discussion (Misc queries) 0 March 23rd 05 05:55 PM


All times are GMT +1. The time now is 12:23 PM.

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

About Us

"It's about Microsoft Excel"