Sending multiple query's in one spreadsheet

G

Guest

I am using the send object command in a macro to send 3 seperate query's via
Outlook email. These query's create 3 seperate spreadsheets....How can I
incorporate these 3 query's in one spreadsheet? I would like to send these 3
query's in one spreadsheet (3 seperate worksheets/tabs)...Any suggestions?
Thank You.
 
R

Ron2006

Instead of doing sendobject and sending the query, do
transferspreadsheet of the three queries into the same xls file
(spreadsheet name) and then you will have to use outlook automation to
send that spreadsheet as an attachment.

==============================

Here is an example:

Set o = CreateObject("Outlook.Application")

Set m = o.CreateItem(0)

m.To = "Paul Tucker" ' The distribution list name goes here
m.Subject = "SUPP Analysis Spreadsheet "
m.body = Chr(13) & Chr(13) & _
" Date: " & date & Chr(13) & _
Chr(13)
m.attachments.Add ReportDir & exportName ' point to the full address of
attachment here
' There can be multiple of the above
' m.display ' display shows email and the user has to press send button

m.send ' Send does it automatically with security from Outlook

==================================

Ron
 

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