Sending E-mailshot using Automation

J

Jon Lewis

I'm writing a routine to send a standard email to a group of customers using
Automation from Access.

If I create my standard email with the required content in the message body
I can save the message as a Outlook Template (OFT file). Manually I can
then use File>New>Choose Form etc and pick the saved template and the
message content is in the message body as expected.

How can I do this using automation?

If I use the Set objOutlookMsg =
objOutlook.CreateItemFromTemplate(strTemplate) method I get a message based
on my Template (e.g. the Subject field is reproduced correctly) but any text
in the content matter has dissappeared and any graphic objects either appear
as attachments (bmp's) or again have dissappeared (GIF's).

I'm setting the body format to HTML (objOutlookMsg.BodyFormat =
olFormatHTML).

Should I be using a different method?

Also how can I bypass the Outlook security dialog (A program is trying to
access email address's etc.). The dialog is manageable if I'm using
objOutlookMsg.Save (it fires once per session) but not if I'm using
objOutlookMsg.Send when it fires three times per email!

TIA
 
J

Jon Lewis

Jon Lewis said:
I'm writing a routine to send a standard email to a group of customers using
Automation from Access.

If I create my standard email with the required content in the message body
I can save the message as a Outlook Template (OFT file). Manually I can
then use File>New>Choose Form etc and pick the saved template and the
message content is in the message body as expected.

How can I do this using automation?

If I use the Set objOutlookMsg =
objOutlook.CreateItemFromTemplate(strTemplate) method I get a message based
on my Template (e.g. the Subject field is reproduced correctly) but any text
in the content matter has dissappeared and any graphic objects either appear
as attachments (bmp's) or again have dissappeared (GIF's).

I'm setting the body format to HTML (objOutlookMsg.BodyFormat =
olFormatHTML).

Should I be using a different method?

Also how can I bypass the Outlook security dialog (A program is trying to
access email address's etc.). The dialog is manageable if I'm using
objOutlookMsg.Save (it fires once per session) but not if I'm using
objOutlookMsg.Send when it fires three times per email!

TIA
 

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