Importing a query from Access into an E-Mail

D

Dave Brownhill

Hi,
I'm currently using Access and Outlook 2002 and I'm trying to get a query
directly into the body of text of an e-mail instead of an attachment.

The table the information comes from contains appointments for different
staff members for different days. I've had success by exporting the query
into an Excel file and then using the database toolbar in Outlook to Insert a
database, but I'd prefer to able to do this in one go.

I intially tried using the Insert Database function to use the query
created, but it doesnt allow you use a query which prompts for parameters, ie
Staff Code, Appointment Date. As this parameters vary, I'm unable to use the
MS Query function either. After this I've attempted trying to get Access to
to create the email using a module with the code DoCmd.SendObject
acSendQuery, "Clinic List Export", acFormatHTML, "insert email adress", , ,
"test email", "message text" which again works, but attaches the html file
rather than embedding it.

I'd be grateful if anyone out there could suggest a solution that would
either,
A. Allow me to insert a database into the e-mail using a query with a
parameter or
B. Allow me to use Access to create the e-mail with the results of the query
embedded into the e-mail rather than an attachment.

Thanks in advance.
 

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