Attaching queries/tables

KeythStone

New Member
Joined
Mar 30, 2011
Messages
36
Afternoon,

My issues concerns emailing attachments

This is in the world of vba...

I've had much luck in learning how to bypass security pop-ups from outlook while sending emails !! :) !! and I am able to attach files to emails. BUT, I'd like to add as an attachment, a query's or table's results from an Access db.

I understand that i need some sort of structure for data to be seen like a MS spreadsheet or csv. So how can I accomplish this without having to first dump into a file, then attach that file from external source?

Any help is much appreciated.

Stay smooth,

KeythStone
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Thanks for the reply post.

What I've got now is running mail function through DAO library.

My issues is:

,Code> Dim stratt as String
<Code> Set stratt = "query or table output as .xls format"
<Code> mymail.attachment = (stratt)

So, my question is, do I need to first publish a report then pick it up by referring to the file path in stratt string? or can I simply refer to only the query in the current database?

Thanks. Stay Smooth,
KeythStone
 
Upvote 0

Forum statistics

Threads
1,215,430
Messages
6,124,852
Members
449,194
Latest member
HellScout

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top