我错误地隐藏了我的日历如何恢复

I mistakenly hid my calendar how to recover

我运行以下脚本在 outlook 中隐藏文件夹,我错误地隐藏了我的日历

Option Explicit
 
Public Sub HideFolders()

Dim oFolder As Outlook.Folder
Dim oPA As Outlook.PropertyAccessor
Dim PropName, Value, FolderType As String

PropName = "http://schemas.microsoft.com/mapi/proptag/0x10F4000B"
Value = True
 
Set oFolder = Application.ActiveExplorer.CurrentFolder
Set oPA = oFolder.PropertyAccessor

oPA.SetProperty PropName, Value
 
Set oFolder = Nothing
Set oPA = Nothing
End Sub

然后我尝试了以下脚本来恢复我的 Outlook 日历,但它不起作用

Option Explicit
 
Public Sub FindFolders()

Dim oFolder As Outlook.Folder
Dim oPA As Outlook.PropertyAccessor
Dim PropName, Value, FolderType As String

PropName = "http://schemas.microsoft.com/mapi/proptag/0x10F4000B"
Value = False
 
Set oFolder = Session.GetDefaultFolder(olFolderCalendar)
Set oPA = oFolder.PropertyAccessor

oPA.SetProperty PropName, Value
 
Set oFolder = Nothing
Set oPA = Nothing
End Sub

如有任何帮助,我们将不胜感激

您可以使用 OutlookSpy(我是它的作者)在没有脚本的情况下解决这样的问题 - 单击 IMsgStore 按钮,单击“打开文件夹”,select 要打开的文件夹,双击PR_ATTR_HIDDEN 属性 进行编辑。