我有这个代码在Excel中从Outlook创建一个文件夹。如何将View | Reading pane
设置为'关闭'?
Set olFolders = olSourcefolder.Parent.Folders
olFolders.Add "Audits-Actuals"'how do i set the reading pane to off?
答案 0 :(得分:2)
你想要的是什么,但你需要先做点什么
创建视图的屏幕截图
Public Sub CreateAndApplyView()
Dim ol As New Outlook.Application
Dim CurrentFolder As Outlook.MAPIFolder
Dim NewFolder As Outlook.Folder
Set CurrentFolder = ol.ActiveExplorer.CurrentFolder
Set NewFolder = CurrentFolder.Folders.Add("Audits-Actuals")
'~~> What you need is from here. You need to activate the folder
'~~> before you activate the view
Set CurrentFolder = NewFolder
ol.ActiveExplorer.SelectFolder CurrentFolder
ol.ActiveExplorer.CurrentView = "RPO"
End Sub
这就是我在运行代码后得到的结果。