ViewCtl Members (Outlook View Control)

The Microsoft Outlook View Control displays information about a specific folder and can be integrated into solutions that provide access to Outlook data. The ViewCtl object provides programmatic access to the View Control. The control can be placed in any container that supports ActiveX® controls, including an HTML page that is hosted in Outlook as a Folder Home Page, or a custom Outlook form. If the View Control is placed in an HTML page that is hosted in a browser such as Internet Explorer, some functions of the control are disabled for security.

Methods

Name Description
AddressBook Displays the Microsoft Outlook Address Book dialog box.
AddToPFFavorites Adds the current public folder to the user's Microsoft Exchange Server Favorites public folder.
AdvancedFind Displays the Microsoft Outlook Advanced Find dialog box.
Categories Displays the Microsoft Outlook Categories dialog box for the currently selected item or items in the control.
CollapseAllGroups Collapses (closes) all groups that are displayed in the control.
CollapseGroup Collapses (closes) the group that is currently selected in the control.
CustomizeView Displays the Microsoft Outlook View Summary dialog box.
Delete After prompting the user to confirm, deletes the groups or items that are currently selected in the control.
ExpandAllGroups Expands (opens) all groups that are displayed in the control.
ExpandGroup Expands (opens) the group that is currently selected in the control.
FlagItem Displays the Microsoft Outlook Flag for Follow Up dialog box for the selected item.
ForceUpdate Refreshes the view in the control, applying any property changes made since the DeferUpdate property was set to True.
Forward Executes the Forward action for the item or items that are selected in the control.
GoToDate Opens a calendar view of a specific date.
NewAppointment Creates and displays a new appointment.
NewContact Creates and displays a new contact.
NewDefaultItem Creates and displays a new Microsoft Outlook item.
NewDistributionList Creates and displays a new distribution list.
NewForm Displays the Microsoft Outlook Choose Form dialog box.
NewJournalEntry Creates and displays a new journal entry.
NewMeetingRequest Creates and displays a new meeting request.
NewMessage Creates and displays a new email message.
NewNote Creates and displays a new note item.
NewPost Creates and displays a new post item.
NewTask Creates and displays a new task.
NewTaskRequest Creates and displays a new task request.
Open Opens the item or items that are currently selected in the control.
OpenSharedDefaultFolder Displays a specified user's default folder in the control.
PrintItem Prints the items that are currently selected in the control.
Reply Executes the Reply action for the item or items selected in the control.
ReplyAll Executes the ReplyAll action for the item or items that are selected in the control.
ReplyInFolder Creates a post item for each message that is currently selected in the control.
SaveAs Saves the items that are selected in the control as a single file.
SendAndReceive Sends all messages that are in the Outbox folder and checks for new messages.
ShowFields Displays the Microsoft Outlook Show Fields dialog box.
Sort Displays the Microsoft Outlook Sort dialog box.
SynchFolder Synchronizes the online and offline folders that are displayed in the control.

Properties

Name Description
ActiveFolder Returns an object that represents the folder displayed in the control. Read-only.
DeferUpdate Gets or sets a Boolean value that indicates whether property changes affect the control display. Read/write.
EnableRowPersistance Gets or sets a value that indicates whether the View Control retains state information about the last selected row. Read/write.
Filter Gets or sets a String that represents the Distributed Authoring and Versioning (DAV) Searching and Locating (DASL) statement used to restrict the display to a specified subset of data. Read/write.
FilterAppend Gets or sets a String that represents the additional criteria to add to the filter settings. Read/write.
Folder Gets or sets a String that represents the path of the folder displayed by the control.
ItemCount Returns a Long that indicates the count of objects in the current folder displayed in the control. Read-only.
Namespace Returns or sets a String that represents the namespace property of the control. Read/write.
OutlookApplication Returns an object that represents the container object for the control. Read-only.
Restriction Sets or returns a String that represents a filter to the items that are displayed in the control. As a result, the control displays only those items that match the filter. Read/write.
SelectedDate Returns or sets the selected date. Read-only.
Selection Returns a Selection object that consists of one or more items that are selected in the current view. Read-only.
View Returns or sets a String that represents the name of the view in the control. Read/write.
ViewXML Returns or sets a String that represents the view implementation via XML. Read/write.

Events

Name Description
Activate Occurs when a View Control becomes the active element on the page, either as a result of user action or through program code.
BeforeViewSwitch Occurs before Microsoft Outlook changes the view that is applied to the folder displayed in the View Control element, either as a result of user action or through program code.
SelectionChange Occurs when the selection of the current view changes.
ViewSwitch Occurs when Microsoft Outlook changes the view that is applied to the folder displayed in the View Control element, either as a result of user action or through program code.

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.