Access to Outlook

T

tiger

Hi,

I embed the code below in my button click, so that when the button is click
an email will be send but....How do I get rid of the pop up message from
outlook "Microsoft Office Outlook: A Program is trying to automatically send
e-mail on your behalf. Do you want to allow this? If this is unexpected, it
may be a virus and you should chose 'No'".

Dim olApp As Outlook.Application
Dim olMsg As Outlook.MailItem

Set olApp = new outlook.MailItem
Set olMsg = CreateItem(olMailItem)

With olMsg
.To = EmailAddress
.Subject = "Yo"
.Body = "Hey now"
.Send
End With

Thanks
Tiger
 
G

Guest

This is one of those great new M/soft security "features" that is hard to
sidestep but - hey - is keeping us all in work! The only way I've come
across to avoid this is to use Redemption: a library of safe objects in
Outlook that, amongst other things, gives you ways to avoid this security
message. It was developed by Dmitry, one of the MVPs, and is downloadable
from his website (do a search on "Redemption" in the Outlook Programming
community to find a link).
 
U

UpRider

Tiger, I hate to use kludges like Redemption. You don't know what will
happen in the future when you upgrade.
My approach was to have Access via automation export a list of email
addresses directly into an Outlook contacts folder. Then I switch to Outlook
and use mail merge to send email to everyone in that folder. One drawback is
that attachments are NOT allowed.

HTH
UpRider
 
A

Arvin Meyer [MVP]

UpRider said:
Tiger, I hate to use kludges like Redemption. You don't know what will
happen in the future when you upgrade.

Using that logic, you can never be sure of anything, can you? After all even
standard VB6 programs may or may not work in the next version of Windows.
Controls which work with the dotNet 1.1 Framework, don't necessarily work
with the 2.0 Framework. Even Outlook worked correctly until a security patch
broke it. There are no guarantees in life, we just do the best we can. I
would prefer using Redemption with Outlook as a first choice, because of the
ease of programming it and its stability. As a second choice I'd use CDO or
a straight SMTP script.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access
 
V

vavroom

I'm glad I found this more recent thread about this issue :) I hope
someone can point me out in the right direction :)

I've (finally) managed to get some code working right for what I want
to do (that is, sending an email with an attachment and a different
body of text depending on which button is clicked).

But I get this warning as well. Redemption does seem like the best bet
for me at this point, however, I'm really not clear on how to best
modify code to make it work. The redemption site isn't all that clear
(well, not for *this* non coder). Can anyone point me in the right
direction as to how to best implement this?

Thanks
 

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

Top