Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Word
application.errors
conversions
docmanagement
drawing.graphics
formatting.longdocs
international
internet.assistant
mail
mailmerge.fields
menustoolbars
newusers
numbering
oleinterop
pagelayout
printingfonts
setup.networking
spelling.grammar
tables
vba.addins
vba.beginners
vba.customization
vba.general
vba.userforms
web.authoring
word6-7macros
word97vba
  
 
date: Tue, 18 Sep 2007 09:04:02 -0700,    group: microsoft.public.word.vba.customization        back       


Word2007 & Application.FileSearch   
I have a number of macros that have been running since Word98, but now when 
run in Word2007 they blow out with an error #5111 - "This command is not 
available on this platform". When I ran it down it turned out to be the 
Application.Filesearch which was causing the error.  I checked the Object 
browser for Word2007 and All Libraries, it seems that the FileSearch doesn't 
exist anymore.

Is this true or am I missing something?

If it doesn't exist anymore how can I now search a directory for a file in 
Wood2007?

I use the Application.FileSearch in quite a few places in my macros.

Thanks,
Steve
date: Tue, 18 Sep 2007 09:04:02 -0700   author:   StephenW

Re: Word2007 & Application.FileSearch   
Hi StephenW,

application.filesearch has gone.

>If it doesn't exist anymore
>how can I now search a directory for a file in Wood2007?

See help on "dir" function.

See as well:
http://word.mvps.org/faqs/macrosvba/ReadFoldersIntoArray.htm

If you're somewhat advanced, together with "shell",
you might find code like this helpful, too.

C:\Test>dir *.doc /b /S > c:\dir.txt

See in addition:
Several techniques to "Shell and Wait" on Win32 systems
http://vb.mvps.org/samples/project.asp?id=Shell32

For using the filesystem object, see:
http://tinyurl.com/3acv42

-- 
Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
date: Tue, 18 Sep 2007 20:48:59 +0200   author:   Helmut Weber

Re: Word2007 & Application.FileSearch   
Thanks, I'll look into your suggestions. Steve

"Helmut Weber" wrote:

> Hi StephenW,
> 
> application.filesearch has gone.
> 
> >If it doesn't exist anymore
> >how can I now search a directory for a file in Wood2007?
> 
> See help on "dir" function.
> 
> See as well:
> http://word.mvps.org/faqs/macrosvba/ReadFoldersIntoArray.htm
> 
> If you're somewhat advanced, together with "shell",
> you might find code like this helpful, too.
> 
> C:\Test>dir *.doc /b /S > c:\dir.txt
> 
> See in addition:
> Several techniques to "Shell and Wait" on Win32 systems
> http://vb.mvps.org/samples/project.asp?id=Shell32
> 
> For using the filesystem object, see:
> http://tinyurl.com/3acv42
> 
> -- 
> Greetings from Bavaria, Germany
> 
> Helmut Weber, MVP WordVBA
> 
> Win XP, Office 2003
> "red.sys" & Chr$(64) & "t-online.de"
> 
> 
> 
> 
> 
>
date: Tue, 18 Sep 2007 12:00:05 -0700   author:   StephenW

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us