Home > Net >  I mistakenly hid my calendar how to recover
I mistakenly hid my calendar how to recover

Time:03-24

I ran the following script to hide folders in outlook and I mistakenly hide my calendar

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

I then tried the following script to recover my outlook calendar but it did not work

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

any assistance will be greatly appreciated

CodePudding user response:

You can fix a problem like that without a script using OutlookSpy - click IMsgStore button, click "Open Folder", select the folder to open, double click the PR_ATTR_HIDDEN property to edit.

CodePudding user response:

my new script actually worked, i just needed to restart outlook after i ran it

  • Related