View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default Macro to convert CSV to PRN

do you actually want to change them from comma delimited to fixed column?

Or do you just want to rename them to have a .prn extension?

If fixed column, would they all have the same format?

Or do you just want to load them into excel and then save them as PRN -
however they come out.

for a list of files

Sub listfiles()
Dim rw as Long, sPath as String
Dim sName as String
rw = 2
sPath = "C:\MyDirectory\MySubfolder\"
sName = dir(spath & "*.csv")
do while sName < ""
cells(rw,1) = sName
sName = dir
rw = rw + 1
Loop
End sub


--
Regards,
Tom Ogilvy



"fugazi48" wrote:

I know I am not the only one to need this so I was hoping someone could help.

The search engines keep coming up with ABC software that I don't plan on
buying and I can't find any shareware.

I have dozens of CSV files that I need converted to PRN. Does anyone have a
Macro that will do this? I wish I had a batch file to do a list of filenames
but that is asking too much. Thnks.