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 2006

Tip: Looking for answers? Try searching our database.

VB Code to create folders

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bikini Browser - 04 Feb 2006 13:03 GMT
Hi

Does anyone  have any VB Code that can create a folder if it does not exist?
Perhaps C:\temp  ?  And if it does exists, don't do anything.

Where can I look for code like that?
Doug Robbins - Word MVP - 04 Feb 2006 13:54 GMT
On Error GoTo mdir
ChDir "C:\MyNewFolder"

mdir:
If Err.Number = 76 Then
   MkDir "c:\MyNewFolder"
Else
   Exit Sub
End If

Signature

Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

> Hi
>
> Does anyone  have any VB Code that can create a folder if it does not
> exist? Perhaps C:\temp  ?  And if it does exists, don't do anything.
>
> Where can I look for code like that?
 
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.