email records

J

jpb

How do I email records, as a table in the body of an email, to unique email
addresses from a query? Looking to find all records that contain email
address and send those records in the body of an email.
 
D

Daniel Pineault

If you wish to send an e-mail in a tubular format then you will need to use
outlook automation in HTML format and use HTML coding to create your format.

For basic information on automating outlook se
http://msdn.microsoft.com/en-us/lib...odc_ac_olauto_sendanoutlookmessageusingaccess

However, you will need to switch the .body to .HTMLbody and then build your
content/HTMLbody content using standard HTML tags.

You need to code your message as if you were creating a HTML document, all
the standard tag apply (<i></i>, <b></b>, <br/>, <p>, <h1>,..., <h6>, <a
href>..., <img src>...., ...). Make sure you use opening and closing <HTML>
and <BODY> tags.



An alternative would be to create a report an simply include the report as
an attachment in a basic e-mail, thus avoiding the need to build custom HTML
code.
--
Hope this helps,

Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples: http://www.devhut.net
Please rate this post using the vote buttons if it was helpful.
 
J

jpb

Daniel,
I'd like to have the records show in the body of the email as opposed to an
attachment. Worse case case could be an attachment but trying to display the
information right up front.

The other twist is our email program is lotus notes. Does this complicate
matters?

JPB
 
G

GeoffG

You will only be able to construct the email manually (if Lotus Notes
doesn't support Automation).

If Lotus Notes allows outgoing emails in HTML format, then you could:

1. Design a query to select records that have email addresses. (I say
this because your first post said they were the records you were interested
in.)
2. Run the query.
3. Copy the records returned by the query.
4. To do this, drag the mouse down the record selectors on the left edge
of the query and press CTRL-C.
5. Open a new email (in HTML format).
6. Paste the records into the body of the email using CTRL-V. This should
construct a table automatically.

This works in Microsoft Outlook. You'll need to discover whether it works
in Lotus Notes.

You could use the same technique to copy and paste the email addresses into
the "To" field, but I think you'll need to edit them - probably to put a
semicolon between each address. Alternatively, you could get Access to
construct a string of email addresses.

Geoff
 
T

Tony Toews [MVP]

jpb said:
How do I email records, as a table in the body of an email, to unique email
addresses from a query? Looking to find all records that contain email
address and send those records in the body of an email.

See the Sample Code illustrating looping through a DAO recordset page
at the Access Email FAQ at
http://www.granite.ab.ca/access/email/recordsetloop.htm

Microsoft Access Email FAQ
http://www.granite.ab.ca/access/email.htm

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 

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