SolutionsModule 对象 (Outlook)SolutionsModule object (Outlook)

代表浏览器的导航窗格中的 "解决方案" 导航模块。Represents the Solutions navigation module in the navigation pane of an explorer.

说明Remarks

"解决方案" 导航模块包含各个外接程序的开发人员要在导航窗格中向用户公开的文件夹。The Solutions navigation module contains folders that developers of individual add-ins want to expose to users in the navigation pane. 每个解决方案在 "解决方案" 模块下都具有一个根文件夹,每个根文件夹可包含用于保存异构 Outlook 项目的子文件夹。Each solution has one root folder under the Solutions module, and each root folder can contain subfolders that hold heterogeneous Outlook items.

若要以编程方式将解决方案文件夹添加到 "解决方案" 模块中, 请使用从**NavigationModule** 对象派生的SolutionsModule对象。To add solution folders programmatically to the Solutions module, use the SolutionsModule object, which is derived from the NavigationModule object.

若要获取 "解决方案" 模块的对象, 必须首先确定 "解决方案" 模块是否存在于导航窗格中。To obtain an object for the Solutions module, you must first determine whether the Solutions module exists in the navigation pane. 要做到这一点,使用 NavigationPane 对象的 模块 属性来获取 NavigationModules 集合,然后在 GetNavigationModule 方法的 NavigationModules 集合中指定 olModuleSolutions 参数。To do that, use the Modules property for the NavigationPane object to obtain a NavigationModules collection, and then specify the argument olModuleSolutions in the GetNavigationModule method of the NavigationModules collection.

如果调用成功, 则可以将返回的NavigationModule对象引用转换为SolutionsModule对象, 以访问该导航模块的属性和方法。If the call is successful, you can then cast the returned NavigationModule object reference as a SolutionsModule object to access the properties and methods for that navigation module.

若要添加解决方案根文件夹及其子文件夹, 请将**folder** 对象引用传递给SolutionsModule对象的**AddSolution** 方法。To add a solution root folder and its subfolders, pass a Folder object reference to the AddSolution method of the SolutionsModule object. "解决方案" 模块在导航窗格中的默认位置为 "9"。The default position of the Solutions module on the navigation pane is '9'.

如果没有任何解决方案添加到 "解决方案" 模块中, 则它在导航窗格中不可见, 并且任何设置**位置** 或SolutionsModule对象的**visible** 属性的尝试都会引发错误。If no solutions have been added to the Solutions module, it is not visible in the navigation pane, and any attempt to set the Position or the Visible properties of the SolutionsModule object raises an error. 此外,对将 SolutionsModule 设置为 NavigationPane 对象的 CurrentModule 属性的任何尝试都将引发错误。In addition, any attempt to set the SolutionsModule as the CurrentModule property of the NavigationPane object raises an error.

示例Example

若要查看将文件夹添加到 "解决方案" 模块中的外接程序的示例, 请参阅 MSDN 上的编写 Outlook 2010 解决方案模块一文。To see an example of an add-in that adds folders to the Solutions module, see the articleProgramming the Outlook 2010 Solutions Module on MSDN. 外接程序将解决方案模块重命名为解决方案演示, 将 "日历"、"联系人" 和 "任务" 文件夹作为子文件夹添加到解决方案根文件夹中, 为每个子文件夹设置自定义图标, 并自定义导航窗格以移动和放大解决方案演示模块的按钮。The add-in in the article renames the Solutions module as Solution Demo, adds calendar, contacts, and tasks folders as subfolders to the solution root folder, sets custom icons for each of the subfolders, and customizes the navigation pane to move and enlarge the button for the Solution Demo module.

方法Methods

名称Name
AddSolutionAddSolution

属性Properties

名称Name
ApplicationApplication
Class
名称Name
NavigationModuleTypeNavigationModuleType
ParentParent
PositionPosition
SessionSession
VisibleVisible

另请参阅See also

Outlook 对象模型引用Outlook Object Model Reference

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.