Check if folder exist

J

Jay©

Hi I'm trying to check if a folder exist and if not create
the folder. I have the code below but I keep on getting an
error "an object could not be found".

Set f5 = f4.Folders(mfolder) 'this works
Set f6 = f5.Folders(mr_number) 'this blows up
If f6 Is Nothing Then
f5.Folders.Add (mr_number)
End If

Anybody can help?

Thanks,
Jay
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top