Class NavigationGroup (Outlook VBA)
The class NavigationGroup represents a navigation group displayed by a navigation module in the navigation pane. To use a NavigationGroup class variable it first needs to be instantiated, for example
For Each
Here is an example of processing the NavigationGroup items in a collection.
Dim cme As CalendarModule: Set cme =
Dim ngp As NavigationGroup
For Each ngp In cme.NavigationGroups
Next ngp
Class
Returns an OlObjectClass constant indicating the object's class. Here you can find possible values for
This property returns olNavigationGroup for the NavigationGroup object.
Dim ngp As NavigationGroup: Set ngp =
Dim oocsClass As OlObjectClass
oocsClass = ngp.Class
GroupType
Returns an OlGroupType constant that indicates the group type for the NavigationGroup object. Possible return values are olCustomFoldersGroup - Identifies a user-defined navigation group, added using either the Outlook user interface or an add-in, olFavoriteFoldersGroup - Identifies the Favorite Folders navigation group. This navigation group exists only within the NavigationGroups collection of a MailModule object and cannot be created in or accessed from other modules, olMyFoldersGroup - Identifies a navigation group that, by default, contains any folders that are part of the local store, olOtherFoldersGroup - Identifies a navigation group that, by default, contains shared folders from sources other than that of other persons, olPeopleFoldersGroup - Identifies a navigation group that, by default, contains shared folders from other persons, olReadOnlyGroup - Identifies a navigation group that is, by default, read-only and no folders can be added or removed from that navigation group. This does not imply the folders themselves are read-only, and write access to the folders depends on how the folders are set up, olRoomsGroup - Identifies the Rooms navigation group in the Calendar navigation module.
Dim ngp As NavigationGroup: Set ngp =
Dim ogtGroupType As OlGroupType
ogtGroupType = ngp.GroupType
Name
Returns or sets a String value that represents the display name for the NavigationGroup object.
This property is limited to 127 characters. String values longer than 127 characters are truncated. An error occurs if you attempt to set the value of this property for any NavigationGroup object associated with a MailModule object.
Dim ngp As NavigationGroup: Set ngp =
ngp.Name =
NavigationFolders
Returns a NavigationFolders object that contains the set of navigation folders associated with the NavigationGroup object.
Dim ngp As NavigationGroup: Set ngp =
Dim nfsNavigationFolders As NavigationFolders
Set nfsNavigationFolders = ngp.NavigationFolders
Position
Returns or sets a Long value that represents the ordinal position of the NavigationGroup object when displayed in the navigation pane.
This property can only be set to a value between 1 and the value of the Count property for the parent NavigationGroups object. An error occurs if you attempt to set this property to a value outside that range. Changing the value of this property for a NavigationGroup object changes the Position values of other navigation groups contained by a NavigationGroups collection, depending on the relative change between the new value and the original value of the Position property for that NavigationGroup object:
Dim ngp As NavigationGroup: Set ngp =
ngp.Position =
Session
Returns the NameSpace object for the current session.
The Session property and the GetNamespace method can be used interchangeably to obtain the NameSpace object for the current session. Both members serve the same purpose. For example, the following statements perform the same function: