Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Document Management / February 2006

Tip: Looking for answers? Try searching our database.

Printing lists of folder names under one name

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
StoneArch - 16 Feb 2006 16:54 GMT
I have XP Windows 2003,  I have created a named folder, such as Templates.1.  
When I open it up I have a list of many folders with documents in them.  What
I need to do is just print out the list of the folders, no documents, just
the names of the folders.  What can I do?
Kevin B - 16 Feb 2006 17:51 GMT
The following macro will print the names of the folder in your specified path.

======================================================

Sub Folders()

   Dim doc As Document
   Dim strName As String
   Dim strPath as string
 
   Set doc = ActiveDocument
   strPath = "C:\
   strName = Dir(strPath vbDirectory)
   
   Do Until strName = ""
       Selection.Text = strName & vbCrLf
       Selection.EndKey Unit:=wdStory
       strName = Dir
   Loop
   
   Set doc = Nothing

End Sub

Signature

Kevin Backmann

> I have XP Windows 2003,  I have created a named folder, such as Templates.1.  
> When I open it up I have a list of many folders with documents in them.  What
> I need to do is just print out the list of the folders, no documents, just
> the names of the folders.  What can I do?
Graham Mayor - 17 Feb 2006 06:54 GMT
While Kevin's macro will do the job, see also the Printfolders utility
linked from the downloads page of my web site which will allow you to output
folder and file information in a variety of ways.
http://www.gmayor.com/downloads.htm

Signature

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> I have XP Windows 2003,  I have created a named folder, such as
> Templates.1. When I open it up I have a list of many folders with
> documents in them.  What I need to do is just print out the list of
> the folders, no documents, just the names of the folders.  What can I
> do?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.