Share via

SendObject vs CreateObject("Outlook.Application")

Anonymous
2012-04-12T21:36:12+00:00

using access 2003 on windows xp, in a networked environment (outlook exchange), with many users.

my database currently generates a few emails when a user does an action, the email is displayed in outlook then requires the user to click the send. sometimes the user complaints about having to click send. i would prefer to .send the email without showing to the user but get the usually warning messages.

im wondering whats the different between sending emails using the docmd.sendobject and CreateObject("Outlook.Application")

im thinking maybe the sendobject would be better for me.

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

HansV 462.6K Reputation points
2012-04-12T21:44:47+00:00

DoCmd.SendObject is "native" Access code. You can attach an Access object (table, query, report), specify the recipients, subject and message text, and whether the message will be displayed or sent immediately. You can't specify formatted text, and you can't attach other files. It will send through the user's default e-mail client.

Automating Outlook through CreateObject("Outlook.Application") or GetObject(, "Outlook.Application") starts or activates Outlook. It offers more options, such as specifying formatted message text, and attaching arbitrary files. You can specify whether the message will be displayed or sent immediately: the MailItem object has .Display and .Send methods.

If you don't need the extra options that automating Outlook offers, I'd use DoCmd.SendObject - it's more general and less likely to cause problems because you don't start another application.

Was this answer helpful?

0 comments No comments

0 additional answers

Sort by: Most helpful