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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Macros - TransferText

Status
Not open for further replies.

KrazyKT

Programmer
Jul 5, 2000
26
0
0
US
I'm working with numerous tables.&nbsp;&nbsp;I created a macro to transfer the text using TransferText command from the tables to text files.&nbsp;&nbsp;Is there a way that I can automatically have the text file pull the same name as the table?&nbsp;&nbsp;I know you can type it in, but I'm looking for a way to save some time.&nbsp;&nbsp;Thanks for the help.<br><br>KT
 
if you are specifying which table you are exporting you can specify the path with filename as well in the arguments of that macro.<br><br>
 
Does this mean every time I would have to type it in?&nbsp;&nbsp;I thought there might be a function or command that tells it to name the text file the same as the table you use in the transfertext.&nbsp;&nbsp;<br><br>KT
 
if you are exporting the same tables as part of a routine, you can store the names of the tables in a separate table. Then you can write code to open the table with the names, move to the first record, capture the table name to a variable and use it in the TransferText statement (in Code), then move to the next record in the table, capture that name and keep going until you reach EOF.&nbsp;&nbsp;If you use the same export specification, its a simple Loop.&nbsp;&nbsp;If there are several specifications, then you should have a second field in the table with the specification name, and capture that to a variable also.<br><br>PaulF
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top