Code Library EnsurePathExists: A Unicode-Safe Way to Create Missing Subfolders in VBA The EnsurePathExists function--based on the API function SHCreateDirectoryExW--is the ultimate tool for verifying and creating folder structures.