Jun 10, 2003 #1 clhare Technical User May 29, 2003 118 US Is there an easy way to check and see if a specific folder already exists, and if it doesn't, create the folder?
Is there an easy way to check and see if a specific folder already exists, and if it doesn't, create the folder?
Jun 10, 2003 Thread starter #2 clhare Technical User May 29, 2003 118 US I should probably add that I am working in Word. I apologize for the double entry in the forum. I got an error the first time, but it apparently made it anyway! Upvote 0 Downvote
I should probably add that I am working in Word. I apologize for the double entry in the forum. I got an error the first time, but it apparently made it anyway!
Jun 10, 2003 1 #3 ssVBAdev Programmer May 23, 2003 257 US Use the File System Object: Set FSO = CreateObject("Scripting.FileSystemObject" Then just test for the folder and/or create it: If Not FSO.FolderExists(FolderPath) Then Set CreatedFolder = FSO.CreateFolder(FolderPath) End If Upvote 0 Downvote
Use the File System Object: Set FSO = CreateObject("Scripting.FileSystemObject" Then just test for the folder and/or create it: If Not FSO.FolderExists(FolderPath) Then Set CreatedFolder = FSO.CreateFolder(FolderPath) End If
Jun 11, 2003 Thread starter #4 clhare Technical User May 29, 2003 118 US Thank you for the code! This works beautifully! Are the variables FSO and CreatedFolder both objects then? Cheryl Upvote 0 Downvote
Thank you for the code! This works beautifully! Are the variables FSO and CreatedFolder both objects then? Cheryl