Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Export a text file

Status
Not open for further replies.

Thwarted

Technical User
Oct 10, 2002
32
CA
Hello,
Me again, i have another probably silly question. Does anyone know - is there a quick way to export a txt file to a designated location? I have a little bit of code that runs - it imports a file - puts it in the right places and then tells the user that they have completed this. Now i want to add into that - once it has completed - send a txt confirmation file back to the backup where the original text file was saved to confirm it has been imported.
Any ideas? I'm sure its something simple.
Thanks
T
 
You could create a Macro to export a Table or Query to a text file. The action you would use is called TransferText. It has the following Properties:
Transfer Type (Delimited, Fixed Length, HTML, etc...)
Specificaton Name
Table Name
File Name
Has Field Names
HTML Table Name
Code Page
 


Open "C:\Your Directory\Your File Name.txt" for output as #1
Print #1, "Whatever you want to put into the file"
Close #1

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top