1
我有这段代码在Excel中创建Outlook中的文件夹。如何将View | Reading pane
设置为“关闭”?如何关闭视图|阅读窗格的Outlook文件夹?
Set olFolders = olSourcefolder.Parent.Folders
olFolders.Add "Audits-Actuals"'how do i set the reading pane to off?
我有这段代码在Excel中创建Outlook中的文件夹。如何将View | Reading pane
设置为“关闭”?如何关闭视图|阅读窗格的Outlook文件夹?
Set olFolders = olSourcefolder.Parent.Folders
olFolders.Add "Audits-Actuals"'how do i set the reading pane to off?
你想要什么是可能的,但你需要做的事情第一
截图创建视图
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
这是我运行的代码后得到的。
溃败当然不会工作,谢谢!但是......这个想法是在第一次运行代码时自动发生的。当将来的文件夹被添加时,这一定会派上用场,如果他们采取措施为它做准备,但我的目标是让它神奇地发生。请让我知道,如果你有任何其他想法,但肯定这是一个很好的答案! –