RE: Send an Email without the following message

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Jeff (janteby_at_aol.com)
Date: 09/28/04


Date: Tue, 28 Sep 2004 10:27:41 -0700

I found a SOLUTION, it works perfect for me.

Use this code...

Dim objOutlook As New Outlook.Application
Dim objMail As MailItem

Set objOutlook = New Outlook.Application
Set objMail = objOutlook.CreateItem(olMailItem)

EmailAddr = "xxx@AOL.com"
CopyEmailAddr = "yyy@AOL.com"
Subj = "Test subjject"
Body = "Body"
PathName = "C:\test.txt"

With objMail
    .To = EmailAddr
    .cc = CopyEmailAddr
    .Subject = Subj
    .Body = Body
    .NoAging = True
    .Attachments.Add PathName
    .Display
End With

SendKeys "%{s}", True 'send the email without prompts

Set objMail = Nothing
Set objOutlook = Nothing

Jeff

>-----Original Message-----
>Jeff,
>
>I'm having the same issue. I believe it started when I
updated my Office to
>SP-2 (and new security features?). I haven't found a
way around it yet, but
>I don't think it's related to Firewall as my work PC is
off of the company's
>firewall (and it happens even when sending to internal
email addresses as
>well).
>
>I was going to look into certificates as a possible
solution, but haven't
>made any progress on it. I'll keep looking, but if you
happen to find the
>solution would you mind posting it?
>
>Regards,
>Doug Miller
>
>"Jeff" wrote:
>
>> Hello,
>>
>> I am using the DoCmd.SendObject to send an Email & it
>> works fine.
>>
>> However when it goes to send the Email the following
>> message pops up
>>
>> "A program is trying to automatically send e-mail on
your
>> behalf".
>> "Do you want to Allow this ?"
>>
>> It makes you wait & then you HAVE to hit the Yes
button
>> for it to send the Email.
>>
>> Is their any way arround this to just send the Email,
>> I cant have the user wait & click Yes every time.
>>
>> Also note the Email has a file attachment.
>>
>> Any help would be greatly appreciated !
>> Thank you,
>> Jeff
>> Janteby@AOL.com
>>
>>
>>
>.
>


Quantcast