Checking if a folder exists

  • Thread starter Thread starter liddlem
  • Start date Start date
L

liddlem

Hi Folks
Can anybody please explain to me how to check whether a folder alread
exists.

I have searched the M.S help file and all it shows, is the syntax as
object.FolderExists(folderspec)
but no example of how to actually use it.

What do I substitute in the place of 'object' here?
Am I correct to assume that the code should read something like

If WhatEverTheObjectIs.FolderExists(MyPathName) then
Do Something here
End If

Thanks for your assistance
 
Hi Liddlem,

You should address this question to a word.vba newsgroup. This group is
frequented more by end-users and less by those with the programming
knowledge you seek. Please include the VERSION of Word, Windows and IE
in your message.

Based on what you say in this message, I'd say look in the Word VBA Help
for the information on DIR.

Another possibility would be the FileSystemObject, which has much more
extensive file/folder functionality. This is part of the Microsoft
Scripting Runtime, which may not be installed on an older system. You'd
need to activate a Reference to this library in order to access its help
files. Try a Google search on FileSystemObject in the word.vba
newsgroups for some examples.
Can anybody please explain to me how to check whether a folder already
exists.

I have searched the M.S help file and all it shows, is the syntax as
object.FolderExists(folderspec)

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :-)
 
Thanks Cindy
I found the solution as you suggested - (by searching in google)

And thanks too for the tip on using Word.VBA newsgroups
 
Back
Top