View Single Post
  #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




Ads