Access 2003 and Emailing via Outlook

  • Thread starter Thread starter Scott
  • Start date Start date
S

Scott

The below code ran fine under Access 2000 and XP. Since upgrading to Office
2003, it will send the Access report to Outlook 2003 Outbox, but will not
automatically send. I have to open it from the Outbox and click SEND.

Does anyone know about any Access/Outlook bugs that maybe causing this
behavior? I really want to convert my company over to the new 2003 edition,
but have to get over this problem.


response = InputBox("Enter e-mail address of recipient:", "E-mail
report")
DoCmd.SendObject acSendReport, , acFormatRTF, response
 
If it helps, I noticed the "stuck in outbox" email doesn't have a from
email.

Also, I have the correct references in Access.
 
Hi Scott,

Thanks for your post. If I understand correctly that you are unable to send
the mail automatically via the following codes.

DoCmd.SendObject acSendReport, , acFormatRTF, response

Based on my research, please try to explicitly set the value of EditMessage
parameter of the SendObject method to False to send the message without
edition.

EditMessage parameter
Optional Variant. Use True (-1) to open the electronic mail application
immediately with the message loaded, so the message can be edited. Use
False (0) to send the message without editing it. If you leave this
argument blank, the default (True) is assumed.

For more information on SendObject method, please refer to the following
article:
SendObject Method
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/off2000/htm
l/acmthactSendObject.asp

For example in the northwind.mdb sample database:

DoCmd.SendObject acSendReport, "Employees", , "<mail address>", , , _
"Current Spreadsheet of Employees", , False

It works on my side in Access 2003 with Outlook 2003. Please check to see
if it meets your requirements.


Thanks for posting in community.

Regards,

Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
I tried below, but it still hangs in outbox. Do you have any ideas on a fix?

DoCmd.SendObject acSendTable, "Employees", acFormatRTF, (e-mail address removed),
, , "Test Access", "test", False
 
Hi Scott,

Thanks for your feedback. According to your description, I understand that
your mail sent automatically using VBA code is stuck in the OutBox. If I
have misunderstood, please feel free to let me know.

Based on my test, the e-mail was sent after about 1 minute staying in the
OutBox. How long did the email delay in the OutBox? Can you please wait for
a while to check and see if this mail can be sent?

In addition, please check if there is any antivirus add-in with Outlook,
such as Norton Anti-spam add-in.

I found the following article for your reference.
315886 INF: Common SQL Mail Problems
http://support.microsoft.com/?id=315886

Also, it seems this question is mostly related with the outlook issue. It
would be best you can post this question in the
microsoft.public.outlook.general newsgroup, which is primarily for issues
involving outlook problem.

The reason why we recommend posting appropriately is you will get the most
qualified pool of respondents, and other partners who read the newsgroups
regularly can either share their knowledge or learn from your interaction
with us. I hope the problem can be resolved quickly.

Thank you for posting in community

Regards,

Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
I don't have an answer for this one, but am curious about
the answer because I am having the same problem, i.e.
have to go to Outlook and press Send. I don't want this
to happen because I don't want the user to have the
ability to not send the email!

Christine
 
Back
Top