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

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
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,223,237
Messages
6,170,928
Members
452,366
Latest member
TePunaBloke

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