DoCmd.SendObject - Not letting me press send (1 Viewer)

156sting

Registered User.
Local time
Today, 17:47
Joined
Aug 23, 2012
Messages
28
Hi guys, been a while.

i have a button which sends a report by email using the DoCmd.SendObject acSendReport function. it has worked for a few years and never had an issue. basically when i press the button it loads my pdf into a new mail message in outlook, once i'm happy with it i press send and the email sends. now what is happening is nothing happens when i press send.. it just doesnt do anything..

the weird thing is, for some email addresses it works fine... i am totally baffled and have no idea....... has anyone ever had this problem and found the solution...
 

CJ_London

Super Moderator
Staff member
Local time
Today, 10:47
Joined
Feb 19, 2013
Messages
16,607
Bit confused - you say it just doesn't work, then you say it works for some emails - which is it?

If the former - Perhaps you have removed [Event Procedure] for the click property? have you tried stepping through the code? Perhaps you have error handling which is suppressing error messages?

if the latter then that implies a problem with your data - so step through code, check values and disable error management until you find the problem
 

bastanu

AWF VIP
Local time
Today, 02:47
Joined
Apr 13, 2010
Messages
1,402
Maybe you have a prompt somewhere ( look for the Outlook warning that another program is trying to access it) that prevents the Send? Otherwise I suggest replacing the SendObject with Outlook automation (you will need to use Docm.OutputTo first to export the report as PDF):
Cheers,
 

156sting

Registered User.
Local time
Today, 17:47
Joined
Aug 23, 2012
Messages
28
Bit confused - you say it just doesn't work, then you say it works for some emails - which is it?

If the former - Perhaps you have removed [Event Procedure] for the click property? have you tried stepping through the code? Perhaps you have error handling which is suppressing error messages?

if the latter then that implies a problem with your data - so step through code, check values and disable error management until you find the problem
its really weird, i've realised it must have something to do with the emails they being addressed to. this only started happening after upgrading to a new pc. i never had this issue on the previous pc i was using it with.... it is really weird......
 

156sting

Registered User.
Local time
Today, 17:47
Joined
Aug 23, 2012
Messages
28
Maybe you have a prompt somewhere ( look for the Outlook warning that another program is trying to access it) that prevents the Send? Otherwise I suggest replacing the SendObject with Outlook automation (you will need to use Docm.OutputTo first to export the report as PDF):
Cheers,

i will be moving to the outlook automation as i am using it in a different database just dont have time to change all my code over (theres a few reports i need to use it on)... just wondering if anyone had a similar issue to mine and if they have resolved it really to buy me more time
 

CJ_London

Super Moderator
Staff member
Local time
Today, 10:47
Joined
Feb 19, 2013
Messages
16,607
sorry - no - only as suggested - wrong data and/or all error messages suppressed.
 

Users who are viewing this thread

Top Bottom