Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

List all controls in a Word Doc - and directory

Status
Not open for further replies.

mgkSHA

Programmer
Jul 12, 2002
126
0
0
US
Greetings:

I have switched jobs from primarily database development/report development into full-cycle software development. I am proficient with searching directories in VB, getting the properties of tables, names, etc. I am not *very* familiar with Macros and VBA for Word.

One of the new tasks I need to do is Loop through a directory of fifty folders (one per state) and list all the components found on each Word DOT file (these all contain Macros for proposal development) on a text file.

My question is, each Word template in these folders will have various "components" or controls on them: autotext, toolbars, bookmarks, etc. Is there a way in VBA to get the name of each component? Basically, I need to create an array (which I can do) and get each component and populate a text file. Such as:

Template 1 has: three bookmarks, and two toolbars
Template 2 has: two autotext entries, two bookmarks, etc....

Does anyone know how to get all the components found on a .dot file? And, is searching a directory structure in VBA comparable to doing it with VB? Any assistance is appreciated . Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top