I'm writing a microsoft word macro and having difficulty with vb.net. Please help.
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:
FileSystemObject
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.
System.IO.Directory
1.4m articles
1.4m replys
5 comments
57.0k users