• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

VBA Macro to Open all .txt files in folder in Notepad, from Notepad save as CSV with same filename

Angelique_C

New Member
Hi,

Can anyone point me in the right direction - I need to run a macro to open all .txt files within a folder, but they need to open in Notepad, then save from Notepad as a csv to a new folder but with the same file name.

any suggestestions would be very much appreciated
 
Why open then in notepad
You may be better off opening them in Excel and save as a CSV

Can you paste 2 typical files?
Are the file structures all the same
 
The CSV files need to be batch loaded into a database, these files were originally exported as a word file, the batch load is imported back as a csv but when importing back - it only works when the word doc has first been copied to notepad, saved as .txt then saved from notepad as a csv... not sure why but am needing to automate the whole process as it is very labour intensive. Here is a sample doc file - the "Upload a File"option would not see the .txt file?;
 

Attachments

  • sample.docx
    13.8 KB · Views: 1
Should the commas go where the | characters are ?

what about the header paragraph, does that get exported or ignored?

Can you start a conversation with me and attach a text file there
it is quite possible that saving as a text file from word is saving in a different format to the original files you have
 
I just dragged this text file here and it works ?
Try dragging the text file here instead of using the paper clip?
 

Attachments

  • sample-1.txt
    1.3 KB · Views: 1
Back
Top