Class NavigationFolders (Outlook VBA)
Contains a set of NavigationFolder objects that represent the navigation folders associated with a navigation group. To use a NavigationFolders class variable it first needs to be instantiated, for example
For Each
Here is an example of processing the NavigationFolders items in a collection.
Dim ngp As NavigationGroup: Set ngp =
Dim nfr As NavigationFolder
For Each nfr In ngp.NavigationFolders
With nfr
End With
Next nfr
Add
Adds the specified Folder, as a NavigationFolder object, to the end of the NavigationFolders collection.
A folder can only appear in one navigation group. When adding a Folder object to a new navigation group, any references to that Folder are removed from any other navigation group of which it was previously a member.
Add (Folder)
Folder: The folder to add.
Dim nfs As NavigationFolders: Set nfs =
Dim nfr As NavigationFolder
Set nfr = nfs.Add()
Class
Returns an OlObjectClass constant indicating the object's class. Here you can find possible values for
This property returns olNavigationFolders for the NavigationFolders object.
Dim nfs As NavigationFolders: Set nfs =
Dim oocsClass As OlObjectClass
oocsClass = nfs.Class
Count
Returns a Long indicating the count of objects in the specified collection.
Dim nfs As NavigationFolders: Set nfs =
Dim lngCount As Long
lngCount = nfs.Count
Item
Returns a NavigationFolder object from the collection.
The index value of a NavigationFolder in the collection represents the ordinal position of the folder in the navigation group when displayed in the navigation pane. Changing the position of navigation folders within the navigation group also changes the index values of folders contained within the NavigationFolders collection for that NavigationGroup object.
Item (Index)
Index: Either the index number of the object, or the value used to match the default property of an object in the collection.
Dim nfs As NavigationFolders: Set nfs =
Dim nfr As NavigationFolder
Set nfr = nfs(Index:=1)
Remove
Removes an object from the collection.
Only removable folders, NavigationFolder objects with an IsRemovable property value set to True, can be removed from a NavigationFolders collection. This means that you can use NavigationFolders.Remove to remove shared folders, public folders, and linked folders. However, you must use Folder.Delete to remove any user-created folders.
Remove (RemovableFolder)
RemovableFolder: The navigation folder to be removed.
Dim nfs As NavigationFolders: Set nfs =
nfs.Remove RemovableFolder:=
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: