How to stop Outlook message during Access Email routine

C

Chris Freeman

I have code that I copied from Tom Wickerath, May 7, 2006 routine coding to
send a file attachment using the item.send method. Everything works fine, but
I keep getting the "A program is trying to automatically send an email on
your behalf"

Is there anyway to over ride this. i tried 'docmd.setwarnings false' but
that gave an error.

Set myObject = CreateObject("Outlook.Application")
Set myItem = myObject.CreateItem(0)

With myItem
.Subject = strSubject
.To = strRecipients
.Body = strBody
.Attachments.Add (strFullPath)
.Send
End With

Thanks for the help
 
E

ErezM via AccessMonster.com

hello
you need to use a third party software that bypasses the security
there are many many out there, mapilab is what i like most
it's an addin you download and install, then the next time you send an email,
it will ask you what to do, and let you choose to do it always (meaning it
will no longer ask you!)
remember, though, that you need this peace of add in installed on every
machine your code will run (and your users has to know what to do using it
for the first time, so it will stop naggind them)

good luck
Erez
 

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