By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,696 Members | 2,213 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,696 IT Pros & Developers. It's quick & easy.

putting dir list in document

P: n/a
How can I put the contents of a dir list box into a
document such as word or notepad?
Nov 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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")
"Robert" <an*******@discussions.microsoft.com> wrote in message
news:0e****************************@phx.gbl...
How can I put the contents of a dir list box into a
document such as word or notepad?

Nov 20 '05 #2

P: n/a
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.

"Robert" <an*******@discussions.microsoft.com> wrote in message
news:0e****************************@phx.gbl...
How can I put the contents of a dir list box into a
document such as word or notepad?

Nov 20 '05 #3

P: n/a
* "Robert" <an*******@discussions.microsoft.com> scripsit:
How can I put the contents of a dir list box into a
document such as word or notepad?


What's a dir list box? Are you referring to the control of the
compatibility library?

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.