|
| View previous topic :: View next topic |
| Author |
Message |
StephenW Guest
|
Posted: Tue Sep 18, 2007 4:04 pm Post subject: 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 |
|
| Back to top |
|
 |
Google Sponsor

|
Posted: Tue Sep 18, 2007 4:04 pm Post subject: Advertisement |
|
|
|
|
| Back to top |
|
 |
Helmut Weber Guest
|
Posted: Tue Sep 18, 2007 6:48 pm Post subject: Re: Word2007 & Application.FileSearch |
|
|
Hi StephenW,
application.filesearch has gone.
| Quote: | 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" |
|
| Back to top |
|
 |
StephenW Guest
|
Posted: Tue Sep 18, 2007 7:00 pm Post subject: Re: Word2007 & Application.FileSearch |
|
|
Thanks, I'll look into your suggestions. Steve
"Helmut Weber" wrote:
| Quote: | 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"
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|