Folder.IsSharePointFolder Property

Outlook Developer Reference

Returns a Boolean that determines if the folder is a Microsoft Windows SharePoint Services folder. Read-only.

Version Information
 Version Added:  Outlook 2007

Syntax

expression.IsSharePointFolder

expression   A variable that represents a Folder object.

Remarks

A Windows SharePoint Services folder is a custom folder in Outlook that contains a live copy of the contact list or event list that lives on a Windows SharePoint Services Web site. The contact list maps to a Contacts folder in Outlook and the event list maps to a Calendar folder.

Windows SharePoint Services folders are automatically created under the SharePoint Folders node in the Navigation Pane when a contact list or an event list is exported from the Windows SharePoint Services Web site.

Though Windows SharePoint Services folders work the same way as other folders, there are a few exceptions. Windows SharePoint Services folders are read-only and any attempt to edit folder properties or add, edit, or remove existing items will fail.

A folder in the user’s Microsoft Exchange server folder will never be a Windows SharePoint Services folder, and no folder in the user’s default Personal Folders file (.pst) will ever be a Windows SharePoint Services folder. Typically the Windows SharePoint Services folders will be under the node SharePoint Folders in the Navigation Pane.

Example

The following Microsoft Visual Basic for Applications (VBA) example changes the Subject line of the appointment item displayed in the active inspector and saves the item. If the item is contained in a Windows SharePoint Services folder, it displays a message to the user that the item cannot be modified. To run this example, make sure that an appointment item is displayed in the active inspector window. This example will modify the subject of the appointment item.

Visual Basic for Applications
  Sub ChangeItem()
'Checks if the item is contained in a SharePoint folder. If it is not, it changes the Subject line, and then saves the item.
    Dim myItem As Outlook.AppointmentItem
    Dim fldFolder As Outlook.Folder
Set myItem = Application.ActiveInspector.CurrentItem
Set fldFolder = myItem.Parent
If fldFolder.<strong>IsSharePointFolder</strong> = True Then
    MsgBox _
    "The item is contained in a Windows SharePoint Services folder and cannot be modified."
Else
    myItem.Subject = myItem.Subject + " Changed by VBA"
    myItem.Save
    MsgBox "The item has been changed."
End If

End Sub

See Also