Outlook) (Explorer.CurrentFolder 屬性

傳回或設定代表目前顯示於檔案總管中的資料夾的 Folder 物件。 讀取/寫入。

語法

expression。 CurrentFolder

運算式 代表 Explorer 物件的變數。

註解

使用此屬性可變更使用者正在檢視的資料夾。

範例

此 Visual Basic for Applications (VBA) 範例使用 CurrentFolder 屬性將顯示的資料夾變更為使用者的 Calendar 資料夾。

Sub ChangeCurrentFolder() 
 
 Dim myNamespace As Outlook.NameSpace 
 
 
 
 Set myNamespace = Application.GetNamespace("MAPI") 
 
 Set Application.ActiveExplorer.CurrentFolder = _ 
 
 myNamespace.GetDefaultFolder(olFolderCalendar) 
 
End Sub

另請參閱

檔案總管物件

支援和意見反應

有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。