R Robert Dec 11, 2003 #1 How can I put the contents of a dir list box into a document such as word or notepad?
S solex Dec 11, 2003 #2 You could use word automation and go through each item in the list box and save it to a text file then open the text file in Word. Or you could execute the following command "dir /s >out.doc" and then call System.Diagnostics.Process.Start("Winword.exe out.doc")
You could use word automation and go through each item in the list box and save it to a text file then open the text file in Word. Or you could execute the following command "dir /s >out.doc" and then call System.Diagnostics.Process.Start("Winword.exe out.doc")
S solex Dec 11, 2003 #3 You could also use: System.Diagnostics.Process.Start("out.doc") which is better because you do not need to know where winword.exe is located.
You could also use: System.Diagnostics.Process.Start("out.doc") which is better because you do not need to know where winword.exe is located.
H Herfried K. Wagner [MVP] Dec 11, 2003 #4 * "Robert said: How can I put the contents of a dir list box into a document such as word or notepad? Click to expand... What's a dir list box? Are you referring to the control of the compatibility library?
* "Robert said: How can I put the contents of a dir list box into a document such as word or notepad? Click to expand... What's a dir list box? Are you referring to the control of the compatibility library?