恢复已删除邮件文件夹

时间:2020-09-21 17:39:27

标签: vba outlook

我意外删除了带有VBA宏的Deleted Items文件夹,同时删除了一些不需要的文件夹。我尝试使用以下宏来恢复它,但是没有运气:

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 = False

 

Set oFolder = Session.GetDefaultFolder(olFolderDeletedItems)

Set oPA = oFolder.PropertyAccessor


oPA.SetProperty PropName, Value

 

Set oFolder = Nothing

Set oPA = Nothing

End Sub 

0 个答案:

没有答案