Hi
I need a macro that reads a .Txt file and add ":::" at the end of each line.
Txt file looks like :
[email protected]:maxou
and need to have
[email protected]:maxou:::
For each of the line in the txt file.
Thank you
J
Hi
I need a macro that reads a .Txt file and add ":::" at the end of each line.
Txt file looks like :
[email protected]:maxou
and need to have
[email protected]:maxou:::
For each of the line in the txt file.
Thank you
J
Hello Jeffos101,
This macro reads a single line from the text file, adds the colons, and writes the new data to a temp file on drive "C". If you don't have a drive "C" then you will need to change it in the TmpFile statement of the macro. Once all changes have been made, the original file is destroyed and the temp file is renamed as the original file and will be located in the same directory and drive as the original. This could also be written using the File Scripting Object (FSO), but I find this code easier to read and understand.
To run the macro insert a Standrard VBA Module into your workbook and copy this code into it.![]()
Please Login or Register to view this content.
Calling the Macro:
ModifyTextFile "C:\My Documents\Internet Links\Links.txt"
(Include the Path with the File Name)
Sincerely,
Leith Ross
Last edited by Leith Ross; 04-11-2007 at 07:27 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks