ShowAsOutlookAB Property

Microsoft Outlook Visual Basic

expression.ShowAsOutlookAB

expression    Required. An expression that returns a MAPIFolder object representing a contact items folder.

Remarks

If you set the ShowAsOutlookAB property of a contact items folder to False, it will not be available in the Show Names from the: list in the Select Names dialog box.

Example

The following Visual Basic for Applications (VBA) example creates a reference to the default Contacts folder and modifies its ShowAsOutlookAB property to be displayed as an Address Book.

Sub ShowAsAddressBookChange()

    Dim olApp As Outlook.Application
    Dim nmsName As Outlook.Namespace
    Dim fldFolder As Outlook.MAPIFolder

    Set olApp = Outlook.Application
    'Create instance of namespace
    Set nmsName = olApp.GetNamespace("Mapi")
    Set fldFolder = nmsName.GetDefaultFolder(olFolderContacts)

    'Display the folder as Outlook Address Book
    fldFolder.ShowAsOutlookAB = True

End Sub