Export data from a query to a tab limited text with button

Bursal

Registered User.
Local time
Today, 15:03
Joined
Aug 26, 2012
Messages
25
Eventually I would like to have a button on a form that will automatically create a text a tab limited text file to and get Outlook to put it into a contacts folder, I say do say like because I am sure it is possible. First I want to start the Export to a text file, I will worry about the Outlook side later.

Currently we have a number of queries that contains only email addresses that are exported as a tab limited text files to a folder and then imported to Outlook folders. The process works but is cumbersome.

The other issue is this is split database and I want some of the necessary queries hidden including the email mailing lists, so that the right click – Export is impossible if you can’t see the query.

I have queries (one is qryMembersEmail) that we use manually to start the procedure and I can’t hide it because it is needed to generate the text file. So the first thing is to have a button that generates the text file. Because the query does not include column heading is it possible to put in a first line in the text file (less confusion when you get to import into Outlook). Something like “EmailAddress” followed by the generated email addresses. The text file would go into a folder and overwrite the previous text matching text file.

I am a VBA novice so I am sorry if I come back with seemingly stupid questions.

Thanks for reading my post and I hope you can help.
Di
 

Users who are viewing this thread

Back
Top Bottom