压缩文件夹中的所有文件时出现错误
'''''Create empty Zip File
NewZip (FileNameZip)
Set oApp = CreateObject("Shell.Application")
'''''Copy the files to the compressed folder
oApp.Namespace(FileNameZip).CopyHere oApp.Namespace(FolderName).items ''error here
Run Code Online (Sandbox Code Playgroud)
错误:c:...\Jørgen.doc 无法压缩,因为它包含无法在压缩文件夹中的字符,例如 ø。您应该重命名此文件或目录。
但是,如果我导航到该文件并手动将其复制到 zip 文件夹,它就没有问题。有没有办法在我的 vba 代码中解决这个错误