我正在嘗試使用Application.PathSeparator屬性。但PathSeparator屬性不可用於選擇,如果我將其輸入到我的VBA代碼中,則會出現運行時錯誤438 - 對象不支持此屬性或方法。Outlook VBA:應用程序對象中缺少PathSeparator屬性
有什麼我需要安裝有權訪問PathSeparator?我有MS Office 2007和Outlook 2010.我沒有安裝.Net客戶端。
試圖在以下示例代碼的使用方法:
Sub UnZipFile(strTargetPath As String, Fname As String)
Dim oApp As Object
Dim FileNameFolder As Variant
If Right(strTargetPath, 1) <> Application.PathSeparator Then
strTargetPath = strTargetPath & Application.PathSeparator
End If
FileNameFolder = strTargetPath
Set oApp = CreateObject("Shell.Application")
oApp.Namespace(FileNameFolder).CopyHere oApp.Namespace(strTargetPath & Fname).items
DoEvents
End Sub
是什麼讓你覺得財產應該存在? I.E.你之前看過的地方。顯示一些參考。 –
抱歉。我試圖在特定的Outlook文件夾中循環瀏覽電子郵件以將附件保存到Windows文件夾。一些附件是zip文件中的Excel文件,其他文件只是Excel。所以我有示例代碼來解壓使用這個屬性。看原始問題上面的代碼: – BarryH
看下面是什麼? –