Using SendObject

J

Jesper

I'm using this

DoCmd.SendObject , , , "(e-mail address removed)", , , "subject line of email", "text
in email"

to send an email via outlook express. I'd like to loop it to send several
emails. If I do the first mail will open up BUT wait for me to send/close it
before opening the next. If there're 5 items in the loop can I open up 5
emails at one time?

Jesper
 
R

Rick Brandt

Jesper said:
I'm using this

DoCmd.SendObject , , , "(e-mail address removed)", , , "subject line of
email", "text in email"

to send an email via outlook express. I'd like to loop it to send
several emails. If I do the first mail will open up BUT wait for me
to send/close it before opening the next. If there're 5 items in the
loop can I open up 5 emails at one time?

Jesper

Do you need to see and/or edit the message before sending? If not just set the
final argument to False and the message will not open on the screen at all. It
will just be sent. Otherwise I don't think you can open more than one at a time
using SendObject. You could by automating Outlook (but not Outlook Express).
 
J

Jesper

Do you need to see and/or edit the message before sending? If not just
set the final argument to False and the message will not open on the
screen at all. It will just be sent. Otherwise I don't think you can
open more than one at a time using SendObject. You could by automating
Outlook (but not Outlook Express).

This is great, I don't really need to see the email. I do still get a
message that "a program is trying to communicate" where I have to hit "send"
but it's tolerable. Can I get rid of that?
Thanks for your help. I didn't think of not seeing the emails before sending
them.

Jesper
 
J

Jesper

Do you need to see and/or edit the message before sending? If not just
set the final argument to False and the message will not open on the
screen at all. It will just be sent. Otherwise I don't think you can
open more than one at a time using SendObject. You could by automating
Outlook (but not Outlook Express).

It works pretty well now. I'm experimenting with using a html template, but
it doesn't seem to work.
I've assigned the name of the template as the last argument and the
outputformat as acFormatHTML but the email opens up as text. Does anyone
know?

Jesper
 
D

Dirk Goldgar

Jesper said:
It works pretty well now. I'm experimenting with using a html
template, but it doesn't seem to work.
I've assigned the name of the template as the last argument and the
outputformat as acFormatHTML but the email opens up as text. Does
anyone know?

The output message body is always plain text. The OutputFormat argument
applies to the object being attached (if any), not the message itself.
If you want to send an HTML message, you'll have to automate Outlook or
some other program, and not use SendObject.
 

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