A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Sending Mail from Excel with VBA



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old November 3rd 06, 02:53 AM posted to microsoft.public.outlook.program_vba
RFraley
external usenet poster
 
Posts: 1
Default Sending Mail from Excel with VBA

I have an Excel (2003) VBA application that sends e-mail through our
Exchange server. Everything works fine, but I am looking to address an issue
that is somewhat undesirable with the procedure. The e-mail is sent by
clicking on a command buttom from a userform. As I said; the e-mail is sent
(by the VBA application) correctly. The problem is that the process of
sending the e-mail switches control to Outlook. The user then has to switch
back to the Excel application after the e-mail is sent. This is minor, but
it detracts from the overall professionalism with regard to the appearence
and function of the application. Is it possible to prevent the e-mail code
from switching to Outlook? I'd really like this to be transparent to the end
user. If anyone has a suggestion for how I can improve this situation, I'd
really appreciate some help. Since I don't have much experience with Outlook
and VBA, a code sample would be very helpful.

Thanks in advance
Ralph Fraley


Ads
  #2  
Old November 3rd 06, 07:30 PM posted to microsoft.public.outlook.program_vba
Franck
external usenet poster
 
Posts: 5
Default Sending Mail from Excel with VBA

Haha same problem as me, i find out what is it, it is the new security
from outlook 2003, you can't get rid of it except with a vbscript file
(sendemail.vbs), i learn a way to solve it it's to use the adminpack
(orktools.exe) available on the office 2003 cd's / server 2003 (not
sure) / on the office website. Ive tried it and it didn't work for me,
we use exchange too and this thing make a security group and full of
stuff, it was saving but on opening it wasnt working.
it you want you can shell a .vbs with special script here the code to
send email without popup.

Set objMessage2 = CreateObject("CDO.Message")
objMessage2.Subject = "title of email"
objMessage2.From = "
objMessage2.To = " 'need to be valid adress at
the smtp
objMessage2.TextBody = "message"
'**********
Folowing appear weird on google groups but after the .item theres a
space and the parentesis follow there no enter
***************
objMessage2.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'dont
change this
objMessage2.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"smtp.domain.com"
objMessage2.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
' the port dah
objMessage2.Configuration.Fields.Update
objMessage2.Send


RFraley wrote:
I have an Excel (2003) VBA application that sends e-mail through our
Exchange server. Everything works fine, but I am looking to address an issue
that is somewhat undesirable with the procedure. The e-mail is sent by
clicking on a command buttom from a userform. As I said; the e-mail is sent
(by the VBA application) correctly. The problem is that the process of
sending the e-mail switches control to Outlook. The user then has to switch
back to the Excel application after the e-mail is sent. This is minor, but
it detracts from the overall professionalism with regard to the appearence
and function of the application. Is it possible to prevent the e-mail code
from switching to Outlook? I'd really like this to be transparent to the end
user. If anyone has a suggestion for how I can improve this situation, I'd
really appreciate some help. Since I don't have much experience with Outlook
and VBA, a code sample would be very helpful.

Thanks in advance
Ralph Fraley


  #3  
Old November 4th 06, 02:55 PM posted to microsoft.public.outlook.program_vba
netnews.comcast.net
external usenet poster
 
Posts: 6
Default Sending Mail from Excel with VBA

Thanks; I was able to get this to work from home with my ISP e-mail
provider, but this does not work when I am at work on my company's network.
I need a solution that will work with Exchange and Outlook. I am not
concerned about the security popup; I have a small application called
Express Clickyes that takes care of the security popup. What I want is to
send the e-mail without Outlook becoming the foreground (or active)
application. When the e-mail is sent, the user has to switch back to the
Excel application because Outlook remain active after sending the e-mail.

Thanks in advance for any help provided.
Ralph

"Franck" wrote in message
ups.com...
Haha same problem as me, i find out what is it, it is the new security
from outlook 2003, you can't get rid of it except with a vbscript file
(sendemail.vbs), i learn a way to solve it it's to use the adminpack
(orktools.exe) available on the office 2003 cd's / server 2003 (not
sure) / on the office website. Ive tried it and it didn't work for me,
we use exchange too and this thing make a security group and full of
stuff, it was saving but on opening it wasnt working.
it you want you can shell a .vbs with special script here the code to
send email without popup.

Set objMessage2 = CreateObject("CDO.Message")
objMessage2.Subject = "title of email"
objMessage2.From = "
objMessage2.To = " 'need to be valid adress at
the smtp
objMessage2.TextBody = "message"
'**********
Folowing appear weird on google groups but after the .item theres a
space and the parentesis follow there no enter
***************
objMessage2.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'dont
change this
objMessage2.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"smtp.domain.com"
objMessage2.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
' the port dah
objMessage2.Configuration.Fields.Update
objMessage2.Send


RFraley wrote:
I have an Excel (2003) VBA application that sends e-mail through our
Exchange server. Everything works fine, but I am looking to address an
issue
that is somewhat undesirable with the procedure. The e-mail is sent by
clicking on a command buttom from a userform. As I said; the e-mail is
sent
(by the VBA application) correctly. The problem is that the process of
sending the e-mail switches control to Outlook. The user then has to
switch
back to the Excel application after the e-mail is sent. This is minor,
but
it detracts from the overall professionalism with regard to the
appearence
and function of the application. Is it possible to prevent the e-mail
code
from switching to Outlook? I'd really like this to be transparent to the
end
user. If anyone has a suggestion for how I can improve this situation,
I'd
really appreciate some help. Since I don't have much experience with
Outlook
and VBA, a code sample would be very helpful.

Thanks in advance
Ralph Fraley




  #4  
Old November 4th 06, 02:56 PM posted to microsoft.public.outlook.program_vba
netnews.comcast.net
external usenet poster
 
Posts: 6
Default Sending Mail from Excel with VBA

Thanks; I was able to get this to work from home with my ISP e-mail
provider, but this does not work when I am at work on my company's network.
I need a solution that will work with Exchange and Outlook. I am not
concerned about the security popup; I have a small application called
Express Clickyes that takes care of the security popup. What I want is to
send the e-mail without Outlook becoming the foreground (or active)
application. When the e-mail is sent, the user has to switch back to the
Excel application because Outlook remain active after sending the e-mail.

Thanks in advance for any help provided.
Ralph

"Franck" wrote in message
ups.com...
Haha same problem as me, i find out what is it, it is the new security
from outlook 2003, you can't get rid of it except with a vbscript file
(sendemail.vbs), i learn a way to solve it it's to use the adminpack
(orktools.exe) available on the office 2003 cd's / server 2003 (not
sure) / on the office website. Ive tried it and it didn't work for me,
we use exchange too and this thing make a security group and full of
stuff, it was saving but on opening it wasnt working.
it you want you can shell a .vbs with special script here the code to
send email without popup.

Set objMessage2 = CreateObject("CDO.Message")
objMessage2.Subject = "title of email"
objMessage2.From = "
objMessage2.To = " 'need to be valid adress at
the smtp
objMessage2.TextBody = "message"
'**********
Folowing appear weird on google groups but after the .item theres a
space and the parentesis follow there no enter
***************
objMessage2.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'dont
change this
objMessage2.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"smtp.domain.com"
objMessage2.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
' the port dah
objMessage2.Configuration.Fields.Update
objMessage2.Send


RFraley wrote:
I have an Excel (2003) VBA application that sends e-mail through our
Exchange server. Everything works fine, but I am looking to address an
issue
that is somewhat undesirable with the procedure. The e-mail is sent by
clicking on a command buttom from a userform. As I said; the e-mail is
sent
(by the VBA application) correctly. The problem is that the process of
sending the e-mail switches control to Outlook. The user then has to
switch
back to the Excel application after the e-mail is sent. This is minor,
but
it detracts from the overall professionalism with regard to the
appearence
and function of the application. Is it possible to prevent the e-mail
code
from switching to Outlook? I'd really like this to be transparent to the
end
user. If anyone has a suggestion for how I can improve this situation,
I'd
really appreciate some help. Since I don't have much experience with
Outlook
and VBA, a code sample would be very helpful.

Thanks in advance
Ralph Fraley





  #5  
Old November 9th 06, 05:33 PM posted to microsoft.public.outlook.program_vba
Franck
external usenet poster
 
Posts: 5
Default Sending Mail from Excel with VBA

This current code work with exchange 2003, i had myself used clickyes
the trial version before. But i prefered no popup (well user prefered
that) so i used this one, to work properly be sure the smtp server
adress you use is ok, Recentrly i was using my domain smtp and before i
was using the isp smtp. Send from outside like using hotmail account to
company email and check the header of the email smtp should be there. I
once used smtp.company.local but now for unknown reason i have to use
smtp.isp.com(.ca in my case)

netnews.comcast.net wrote:
Thanks; I was able to get this to work from home with my ISP e-mail
provider, but this does not work when I am at work on my company's network.
I need a solution that will work with Exchange and Outlook. I am not
concerned about the security popup; I have a small application called
Express Clickyes that takes care of the security popup. What I want is to
send the e-mail without Outlook becoming the foreground (or active)
application. When the e-mail is sent, the user has to switch back to the
Excel application because Outlook remain active after sending the e-mail.

Thanks in advance for any help provided.
Ralph

"Franck" wrote in message
ups.com...
Haha same problem as me, i find out what is it, it is the new security
from outlook 2003, you can't get rid of it except with a vbscript file
(sendemail.vbs), i learn a way to solve it it's to use the adminpack
(orktools.exe) available on the office 2003 cd's / server 2003 (not
sure) / on the office website. Ive tried it and it didn't work for me,
we use exchange too and this thing make a security group and full of
stuff, it was saving but on opening it wasnt working.
it you want you can shell a .vbs with special script here the code to
send email without popup.

Set objMessage2 = CreateObject("CDO.Message")
objMessage2.Subject = "title of email"
objMessage2.From = "
objMessage2.To = " 'need to be valid adress at
the smtp
objMessage2.TextBody = "message"
'**********
Folowing appear weird on google groups but after the .item theres a
space and the parentesis follow there no enter
***************
objMessage2.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'dont
change this
objMessage2.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"smtp.domain.com"
objMessage2.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
' the port dah
objMessage2.Configuration.Fields.Update
objMessage2.Send


RFraley wrote:
I have an Excel (2003) VBA application that sends e-mail through our
Exchange server. Everything works fine, but I am looking to address an
issue
that is somewhat undesirable with the procedure. The e-mail is sent by
clicking on a command buttom from a userform. As I said; the e-mail is
sent
(by the VBA application) correctly. The problem is that the process of
sending the e-mail switches control to Outlook. The user then has to
switch
back to the Excel application after the e-mail is sent. This is minor,
but
it detracts from the overall professionalism with regard to the
appearence
and function of the application. Is it possible to prevent the e-mail
code
from switching to Outlook? I'd really like this to be transparent to the
end
user. If anyone has a suggestion for how I can improve this situation,
I'd
really appreciate some help. Since I don't have much experience with
Outlook
and VBA, a code sample would be very helpful.

Thanks in advance
Ralph Fraley



 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Editing contacts in a Public Folder from within Excel VBA Mogge Outlook - Using Contacts 2 August 28th 06 10:02 PM
mail vba excel flek Outlook and VBA 1 June 17th 06 02:40 PM
Problem sending mail via excel Jas Outlook and VBA 2 April 8th 06 09:44 PM
Export DL members to Excel CSV with Outlook VBA [email protected] Outlook and VBA 0 March 17th 06 09:04 PM
Changing of FROM address when sending emails using VBA GeorgeMar Outlook and VBA 2 February 27th 06 08:30 PM


All times are GMT +1. The time now is 09:25 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.