sending mail from within access

J

Jean-Paul

Hi

When I send a report with following code:

DoCmd.SendObject acSendReport, "Coordinaten_rapport", acFormatHTML,
MP_Setup.Coordinaten_rapport, , , "Wijziging van coordianten ", "", False

Outlook opens a messagebox saying something about safty-stuff.
I have to click Yes to continue...
Is there a way not to get this messagebox?

Also,

WHen I write:

DoCmd.SendObject acSendNoObject, strDocName, acFormatHTML, strEmail, , ,
strMailSubject, strMsg, , False

The message itself is opened... although I added "False"

Can somebody please explain

Thanks
JP
 
D

Daniel Pineault

According to the help file the basic synthax is

SendObject(ObjectType, ObjectName, OutputFormat, To, Cc, Bcc, Subject,
MessageText, EditMessage, TemplateFile)

when we compre it to your code

SendObject acSendNoObject, strDocName, acFormatHTML, strEmail, , ,
strMailSubject, strMsg, , False

we can notice that you placed the False as the 10th input variable and yet
the help file indicates it should be the 9th. So try

DoCmd.SendObject acSendNoObject, strDocName, acFormatHTML, strEmail, , ,
strMailSubject, strMsg, False
--
Hope this helps,

Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples: http://www.devhut.net
Please rate this post using the vote buttons if it was helpful.
 
A

Arvin Meyer [MVP]

Yes, Outlook has security warnings which say something to the effect that:

An outside program is trying to send mail. Do you want to allow this.

You are required to click yes to continue. There is a 3rd party app called
Outlook Redemption that will fix this. It is free for non-corporate use, and
not very expensive for enterprise use:

http://www.dimastr.com/redemption/

I've used in effectively in all versions of Outlook which have this warning.
 
J

Jean-Paul

I'm affraid this is a bit too complicated for me...

I downloaded and installed Redemption
Tried it with my acces program... no difference.

But, in the readme.txt I read:

To use Redemption in VB or .Net languages, add "Redemption" library to
your project references.

So I think this might be the problem...
Do I have something to do with the dll file that comes with the zip
file.. if so, what is there to do?
Thanks

JP
 
J

Jean-Paul

Great...
This solved an important part of the problem... So dumb.. I checked and
recheck and never thought the extra imput was the fault.
Thanks a lot

JP, Belgium

Daniel Pineault wrote:
 
R

Rick Brandt

Arvin said:
Yes, Outlook has security warnings which say something to the effect
that:
An outside program is trying to send mail. Do you want to allow this.

You are required to click yes to continue. There is a 3rd party app
called Outlook Redemption that will fix this. It is free for
non-corporate use, and not very expensive for enterprise use:

http://www.dimastr.com/redemption/

I've used in effectively in all versions of Outlook which have this
warning.

Does Redemption affect SendObject though or is it only an alternative for
automation?
 
A

Arvin Meyer [MVP]

Follow the instructions to install Redemption, then open any code window and
find the path to the redemption dll which should be:

C:\WINDOWS\system32\Redemption.dll

and click in the check box.

I'm not sure which zip file you are talking about.
 
A

Arvin Meyer [MVP]

Yes Redemption affects the way that the security patches work in Outlook.
Access is unaffected in any way.
 
J

Jean-Paul

The zip file is the file I downloaded, containg a txt, a dll and an
install file.

What I did:

Open a code window
go to extra
picked "verwijzingen" (first item)
go to browse
search for the redemption.dll
open it
checked the ckeckbox in front of "redemption outlook and MAPI Com Library

restarted access.

Result... exactly the same question asked before sending the mail.

Any Idea?
Thanks
 
A

Arvin Meyer [MVP]

Hopefully you used the install file because that also registered the dll.
Otherwise you'll need to register it manually.

Start >>> Run

then type:

regsvr32.exe "C:\WINDOWS\system32\Redemption.dll"

and click OK. You should get a message that the registration succeeded.

Other than that, I have no further suggestions. Redemption always works for
me.
 

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

DateDiff Question 3
more sendobject-problem info 5
Don't want to send mail 6
Mail Message 2
Email from Access2K2 and Outlook 2007? 9

Top