I'm writing a microsoft word macro and having difficulty with vb.net. Please help.
Check out the answers here - VB6 is almost identical to VBA.
FileSystemObject
A Word Macro is usually written in VBA rather than VB.Net, I'm assuming that you meant VBA?
Use the FileSystemObject
to access the filesystem and then use recursion to "walk" down. Here's a sample:
http://www.java2s.com/Code/VBA-Excel-Access-Word/File-Path/RecursiveSearchusingtheFileSystemObjectModel.htm
If it's actually VB.Net you're using, the idea will be the same but use System.IO.Directory
rather than the FileSystemObject
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With