Strange problems with SendObject

G

Guest

I am using Windows XP Pro, and Access 2000, SR-1
I have code that is designed to use the SendObject to send an email with and
Excel attachment. Immediately following this action is code to check the
value of a group and if the first option is selected, send a second email
with another Excel attachment. When this code is run the first email is sent
as expected but even with the option group returning the value of 1, as
designed, the code run but no email is sent and a variety of strange errors
are returned. "Runtime error 2958. Reserved Error" or "Runtime error 2004.
There is not enough memory to perform this opteation. Close unneeded programs
and try the opereation again."

I have to close the database completely in order to get the SendObject to
send another email. If I step through the code and skip the first SendObject
and move to the If statement and the SendObject within it, That emal is sent,
but it will not do both.

Below is the code for this operation:

DoCmd.SendObject acSendReport, _
"rptAllInvoicesDue-WomenswearToExcel", acFormatXLS, _
"John Doe", , , "Invoices Due", _
"Attahced is the latest list of Invoices Due.", 0
DoEvents
If Me.grpIncludeSummary = 1 Then
DoCmd.SendObject acSendReport,
_"rptWomenswearInvoicesDueByWkByCustToExcel", _
acFormatXLS, "Byron Polk", , , _
"Summary of Womenswear Invoices Due", _
"Attahced is the latest list of Womenswear Invoices
Due.", 0
End If

This issue seems to be something related to the SendObject not being
released or completed, but I just cannot find any solution.

Any assistance is apprecitate.

Mr B
 
G

Guest

TC,

Thanks for the direction. I did as you suggested and basically the answer
seems to be to just use "mapi" and not use the SendObject method.

I have used mapi in the past to send email, but I just got a little lazy and
thought I'd just use the SendObject this time. Bit me again.

Thanks for the reality check. I'll go back to the basics.

Mr B
 
D

Dirk Goldgar

Mr B said:
TC,

Thanks for the direction. I did as you suggested and basically the
answer seems to be to just use "mapi" and not use the SendObject
method.

I thought that problem was supposed to be fixed by SP3. If you haven't
applied that service pack, would you consider doing so?
 
G

Guest

Hi, Dirk.

Thanks for that piece of information. I am currently working on a contract
at a rather large company and do not have the final say in when SPs are
applied.

However, with that said, I will certainly contact the powers that be and see
if we can apply SP3.

I'll post back here with the answer. If I am successful in getting the SP
applied, I will immediately test to see if, in fact, that fixes this issue.
I certainly hope so. It is so much simpler to use the SendObject than the
other way.

Mr B
 
G

Guest

TC,

That's just fine. I have talked to IS support and they are susposed to get
me upgraded to SP3 tomorrow.

I'm very interested in finding out of the SP will correct the problem with
th e SendObject method.

When all you want to do is send an object via email it should work.

Let you know soon.

Mr B
 
G

Guest

First, I would like to thank both of you (TC and Dirk) for your responses to
my post.

I have now been able to get SP3 installed and can confirm that this SP does
infact fix the problem that i was experiencing with the SendObject method.

I noticed that before upgradiing to SP3 when I attempted to use the
SendObject method, the first time I called it, the email was sent with the
attachment. However, the nag about "another trying to send an email" was
never displayed.

Now, with SP3 installed, not only does all occasions of the SendObject send
the email, but also the nag dialog box is presented each time the SendObject
is used.

Thanks again for your assistance.

Mr B
 
D

Dirk Goldgar

Mr B said:
First, I would like to thank both of you (TC and Dirk) for your
responses to my post.

You're welcome.
I have now been able to get SP3 installed and can confirm that this
SP does infact fix the problem that i was experiencing with the
SendObject method.
Excellent!

I noticed that before upgradiing to SP3 when I attempted to use the
SendObject method, the first time I called it, the email was sent
with the attachment. However, the nag about "another trying to send
an email" was never displayed.

Now, with SP3 installed, not only does all occasions of the
SendObject send the email, but also the nag dialog box is presented
each time the SendObject is used.

That's an unfortunate consequence of the e-mail security model. I'm not
sure why it wasn't being displayed before, unless the upgrade that was
done also updated other components. Unfortunately, I don't know a
really good way around this while still using SendObject to send your
e-mails.

The only one solution I can think of that still uses SendObject is to
run a utility such as ClickYes to watch for the security warning dialog
and programmatically click the "Yes" button. I haven't tried that, but
I'm told it works. Aside from that, the workarounds with which I'm
familiar involve abandoning SendObject and either using the Redemption
library or your own SMTP module. I think there are some other methods,
too, requiring a fair amount of work on your part.

For a more detailed discussion of e-mailing from Access, you may want to
look at Tony Toews' Access Email FAQ:
http://www.granite.ab.ca/access/email.htm .
 
G

Guest

For my own use at this point, I am OK with the security dialog box.

I have looked at Tony's info before and I will revisit other options for
sending email at some other time. Right now my plate is a little full with
projects.

I really do appreciate all of the help that the newsgroups provide. I have
started trying to assist others in some small way. Don't want to interject
where not wanted, but when I think I have something to help, I do not mind
trying returning the favor.
 
D

Dirk Goldgar

Mr B said:
I really do appreciate all of the help that the newsgroups provide.
I have started trying to assist others in some small way. Don't want
to interject where not wanted, but when I think I have something to
help, I do not mind trying returning the favor.

That's great, Mr B. It's what these newsgroups are all about. Watch
out, though -- it's addictive.
 
G

Guest

Does cut down on production! Oh, well, I have had and continue to get a lot
of help from others as I expand my development skillset.

Guess I just take the time. Sounds like you have experienced the addition.

Mr B
 

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