E-mail Code

  • Thread starter Thread starter Zan
  • Start date Start date
Z

Zan

Hi,

I have a button that automatically sends an e-mail to
managers of the current worksheet. I have to make a slight
change to the sheet for each manager before I send it out.

When I click the button I get the message that Excel is
trying to automatically send an E-mail, and it may contain
a virus..do you want to send the mail..a progress bar
completes and a Yes No option appears..I click yes and the
e-mail sends.

I use Office XP, this didn't happen in Excel 97, is there
a way to get rid of that box?


Thanks
 
This will be due to the security settings of Outlook.

There is a way around this but it involves either reducing the securit
level of Outlook (not recommended) or getting hold of a little bit o
freeware called ClickYes from Express-Soft
(www.express-soft.com/mailmate/clickyes.html)

Geoff (TheDuck
 
Pain in the backside isn't it? There are ways around it, some more
complicated than others. The simplest way I've seen is this one:

http://www.rondebruin.nl/cdo.htm

There is also a replacement for the Outlook object model called Redemption.
There are also other ways - Google's the place to look I reckon.

Jeff
 
I am an XP user & do a simlar thing in Excel to you.
Line of code I use is: ActiveWorkbook.SendMail Recipients:=
to date, this has thrown up any warning boxes!
If this does not work you can try following:

Sub SendEmail()
Dim olapp As Object
Dim olmail As Object
Set olapp = CreateObject("outlook.application")
Set olmail = olapp.createitem(0)
With olmail
.Subject = "Test" 'enter subject here
.Recipients.Add "(e-mail address removed)" 'add email
address here
.body = "This is a Test" 'enter message here
.attachments.Add 'reference any attachement
.send
End With
Set olmail = Nothing
Set olapp = Nothing
End Sub

Hope helpful
 
I had exactly the same problem. It seems to have been introduced by a
MS security update earlier this year when certain viruses were prone
to hoovering up address book names and automatically sending emails.

I eventually found some software called "Click Yes". This is a small
routine which automatically clicks the 'Yes' button for you. It
doesn't get round the problem of the deliberate 5 second delay while
Outlook waits before allowing the yes button to be clicked, but I can
live with that.

Rgds


On Thu, 12 Aug 2004 04:15:18 -0700, "Zan"

RB>Hi,
RB>
RB>I have a button that automatically sends an e-mail to
RB>managers of the current worksheet. I have to make a slight
RB>change to the sheet for each manager before I send it out.
RB>
RB>When I click the button I get the message that Excel is
RB>trying to automatically send an E-mail, and it may contain
RB>a virus..do you want to send the mail..a progress bar
RB>completes and a Yes No option appears..I click yes and the
RB>e-mail sends.
RB>
RB>I use Office XP, this didn't happen in Excel 97, is there
RB>a way to get rid of that box?
RB>
RB>
RB>Thanks

__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Sending e-mails from specific email address 2
MailEnvelope 1
Sky e-mail via outlook 2
Auto E-mail 12
Sending e-mail with Excel 1
Get Outlook Settings for E-Mail from Excel 1
Hacked e-mail 0
e-mail issue 1

Back
Top