Sending multiple query's in one spreadsheet

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
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
 
Back
Top