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 / Programming / February 2007

Tip: Looking for answers? Try searching our database.

Word 2007 VBA- Application.filesearch

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
herman7 - 23 Feb 2007 03:52 GMT
I have run into problem in Word 2007 with a macro I have used for years.

The macro uses the command
Application.Filesearch
.Lookin = "C:\Folder"

Application.Filesearch not available in the VBA shipped with Word 2007

MSDN website confirms this "Filesearch" property is not available with the
"Application" object. This can be verified by pressing period after
Application in a visual basic window.
What is the work around to get a list of all the files in a folder?
Thanks

Herman
Shauna Kelly - 23 Feb 2007 06:43 GMT
Hi Herman

The workaround is to go back to the 'old' way of doing it, using Dir. For
more information, see
http://www.word.mvps.org/FAQs/MacrosVBA/ReadFilesIntoArray.htm

Hope this helps.

Shauna Kelly.  Microsoft MVP.
http://www.shaunakelly.com/word

>I have run into problem in Word 2007 with a macro I have used for years.
>
[quoted text clipped - 11 lines]
>
> Herman
 
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.